beamer-testbed runs with local user's UID/GID
so that created files aren't owned by root
This commit is contained in:
+1
-5
@@ -61,11 +61,7 @@ RUN apt-get update -qq && \
|
||||
COPY --from=build /usr/local/bundle /usr/local/bundle
|
||||
COPY --from=build /rails /rails
|
||||
COPY --from=beamer /home/beamer/bin/beamer.so /rails/bin/lib/beamer.so
|
||||
|
||||
# Run and own only the runtime files as a non-root user for security
|
||||
RUN useradd rails --create-home --shell /bin/bash && \
|
||||
chown -R rails:rails db log storage tmp
|
||||
USER rails:rails
|
||||
COPY --from=beamer /usr/local/bin/beamer /rails/bin/beamer
|
||||
|
||||
# Entrypoint prepares the database.
|
||||
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
|
||||
|
||||
Reference in New Issue
Block a user