beamer-testbed runs with local user's UID/GID

so that created files aren't owned by root
This commit is contained in:
Mike Dalessio
2025-10-22 14:28:44 -07:00
parent a01e2588d6
commit cd6ef14d00
5 changed files with 10 additions and 8 deletions
+1 -5
View File
@@ -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"]