Skip to content

Commit

Permalink
Merge pull request #33 from LeidenUniversityLibrary/docker-image-labels
Browse files Browse the repository at this point in the history
Set Docker image labels in the correct build stage
  • Loading branch information
bencomp authored Nov 18, 2024
2 parents 69177c4 + c5e8537 commit 8599893
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ARG FTP_VERSION=development
# Clone the repository
ADD ${REPO}#${FTP_VERSION} /fromthepage
WORKDIR /fromthepage
RUN echo "${FTP_VERSION}" > revision.txt
COPY production.rb /fromthepage/config/environments/
COPY database.yml /fromthepage/config/database.yml
RUN --mount=type=bind,source=fix-routes.txt,target=/fromthepage/fix-routes.txt \
Expand All @@ -40,8 +41,6 @@ RUN echo "gem 'ffi', '< 1.17'" >> Gemfile
FROM ruby27-base AS build
ARG BUNDLER_VERSION=2.4.22
ARG DEBIAN_FRONTEND=noninteractive
LABEL org.opencontainers.image.authors="Ben Companjen <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/LeidenUniversityLibrary/fromthepage-podman"

# Install build deps for gems installed by bundler
RUN apt-get update -qq && \
Expand Down Expand Up @@ -83,6 +82,8 @@ RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile

# ------------------
FROM ruby27-base AS production
LABEL org.opencontainers.image.authors="Ben Companjen <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/LeidenUniversityLibrary/fromthepage-podman"

RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down

0 comments on commit 8599893

Please sign in to comment.