FROM ruby:3.2-slim
ENV BUNDLE_PATH /usr/local/bundle/gems
ENV LIB_PATH /var/grape
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential curl git pkg-config libyaml-dev libjemalloc2 && \
rm -rf /var/lib/apt/lists/*
WORKDIR $LIB_PATH
# Copy the project (whole repo) first for proper Gemfile/gemspec loading
COPY . .
RUN gem update --system && gem install bundler
# Install dependencies for the project
RUN bundle install
# Default to a harmless command; the test harness can supply its own command
CMD ["bash","-lc","echo grape container"]