fix: keep gems in app image
This commit is contained in:
parent
9d4cc21b7b
commit
e76f01b0ee
|
|
@ -10,7 +10,8 @@ ARG BUNDLER_VERSION
|
||||||
ENV LANG=C.UTF-8 \
|
ENV LANG=C.UTF-8 \
|
||||||
BUNDLE_JOBS=4 \
|
BUNDLE_JOBS=4 \
|
||||||
BUNDLE_RETRY=3 \
|
BUNDLE_RETRY=3 \
|
||||||
BUNDLE_PATH=/usr/local/bundle
|
BUNDLE_PATH=/app/vendor/bundle \
|
||||||
|
BUNDLE_APP_CONFIG=/app/vendor/bundle
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
@ -56,6 +57,7 @@ FROM runtime-base AS production
|
||||||
ENV RAILS_ENV=production
|
ENV RAILS_ENV=production
|
||||||
|
|
||||||
COPY --from=bundle-production /usr/local/bundle /usr/local/bundle
|
COPY --from=bundle-production /usr/local/bundle /usr/local/bundle
|
||||||
|
COPY --from=bundle-production /app/vendor/bundle /app/vendor/bundle
|
||||||
COPY Gemfile Gemfile.lock /app/
|
COPY Gemfile Gemfile.lock /app/
|
||||||
COPY app /app/app
|
COPY app /app/app
|
||||||
COPY bin /app/bin
|
COPY bin /app/bin
|
||||||
|
|
@ -84,6 +86,7 @@ RUN apt-get update -qq \
|
||||||
&& python3 -m pip install --no-cache-dir invoke
|
&& python3 -m pip install --no-cache-dir invoke
|
||||||
|
|
||||||
COPY --from=bundle-test /usr/local/bundle /usr/local/bundle
|
COPY --from=bundle-test /usr/local/bundle /usr/local/bundle
|
||||||
|
COPY --from=bundle-test /app/vendor/bundle /app/vendor/bundle
|
||||||
COPY Gemfile Gemfile.lock /app/
|
COPY Gemfile Gemfile.lock /app/
|
||||||
COPY app /app/app
|
COPY app /app/app
|
||||||
COPY bin /app/bin
|
COPY bin /app/bin
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue