Sha256: 79e44472915b5a69ff9e06d58182e3ef4539026c2517b3b27eddf3a345b9b685

Contents?: true

Size: 1.44 KB

Versions: 7

Compression:

Stored size: 1.44 KB

Contents

# =============================================================================
# Target: base

FROM ruby:2.7.5-alpine AS base

RUN apk --no-cache --update upgrade && \
    apk --no-cache add \
        bash \
        ca-certificates \
        git \
        libc6-compat \
        openssl \
        tzdata \
        xz-libs \
    && rm -rf /var/cache/apk/*

WORKDIR /opt/app

# =============================================================================
# Target: development
#

FROM base AS development

# Install system packages needed to build gems with C extensions.
RUN apk --update --no-cache add \
        build-base \
        coreutils \
        git \
    && rm -rf /var/cache/apk/*

# Copy codebase to WORKDIR. Unlike application projects, for a gem project
# we need to do this before running `bundle install`, in order for the gem
# we're building to be able to "install" itself.
COPY . .

# Install gems.
RUN bundle install --path=/usr/local/bundle

# =============================================================================
# Target: production

FROM base AS production

# Copy the built codebase from the dev stage
COPY --from=development /opt/app /opt/app
COPY --from=development /usr/local/bundle /usr/local/bundle

# Sanity-check that everything was installed correctly and still runs in the
# slimmed-down production image.
RUN bundle config set deployment 'true'
RUN bundle install --local --path=/usr/local/bundle

CMD ['bundle', 'exec', 'rake']

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
berkeley_library-alma-0.0.7.1 Dockerfile
berkeley_library-alma-0.0.7 Dockerfile
berkeley_library-alma-0.0.6 Dockerfile
berkeley_library-alma-0.0.5 Dockerfile
berkeley_library-alma-0.0.4 Dockerfile
berkeley_library-alma-0.0.3 Dockerfile
berkeley_library-alma-0.0.2 Dockerfile