Fix SCSS compiled file inclusion in Dockerfile
This commit is contained in:
parent
21f71f9d32
commit
a421cd496d
@ -48,9 +48,6 @@ RUN bundle exec bootsnap precompile app/ lib/
|
||||
# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
|
||||
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
|
||||
|
||||
|
||||
|
||||
|
||||
# Final stage for app image
|
||||
FROM base
|
||||
|
||||
@ -58,6 +55,9 @@ FROM base
|
||||
COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
|
||||
COPY --from=build /rails /rails
|
||||
|
||||
# TODO: find how not to depend on this hack to include the compiled SCSS.
|
||||
RUN cp app/assets/builds/application.css `ls public/assets/application-*.css`
|
||||
|
||||
# Run and own only the runtime files as a non-root user for security
|
||||
RUN groupadd --system --gid 1000 rails && \
|
||||
useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
|
||||
|
Loading…
x
Reference in New Issue
Block a user