rubygems-bundler
SUCCESS
32m 12s
History Source
SummaryIterations2Transcript46Dockerfile
Dockerfile30 lines · 656 chars
FROM ruby:alpine3.23

# Install necessary build and runtime dependencies
RUN apk add --no-cache \
  build-base \
  curl \
  git \
  openssl-dev \
  zlib-dev \
  libffi-dev \
  yaml-dev \
  libxml2-dev \
  libxslt-dev \
  ca-certificates

WORKDIR /app

# Copy the repository into the image
COPY . .

# Install Bundler from Rubygems to ensure a known-good interface
RUN gem update --system && gem install bundler --no-document

# Optional: set Bundler path to an isolated location to avoid polluting the image
ENV BUNDLE_PATH=/gems
ENV PATH="/usr/local/bundle/bin:${PATH}"

# Basic smoke test to verify Bundler works in the image
CMD ["bundle", "--version"]