Skip to content

Commit dbb57ad

Browse files
committed
Remove user from container
1 parent 54389ef commit dbb57ad

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ RUN apt-get update -qq && \
5656
COPY --from=build /usr/local/bundle /usr/local/bundle
5757
COPY --from=build /rails /rails
5858

59-
# Run and own only the runtime files as a non-root user for security
60-
RUN useradd rails --create-home --shell /bin/bash && \
61-
chown -R rails:rails db log storage tmp
62-
USER rails:rails
63-
6459
# Entrypoint prepares the database.
6560
ENTRYPOINT ["/rails/bin/docker-entrypoint"]
6661

bin/docker-entrypoint

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then
44
if [ "${SAGITTARIUS_DISABLE_ORCHESTRATOR}" != "true" ]; then
55
# orchestrate dependencies
6-
bundle exec rake orchestrator:start[postgresql] \
7-
orchestrator:start[redis] \
8-
orchestrator:await_healthy[postgresql] \
9-
orchestrator:await_healthy[redis] \
10-
orchestrator:connect_self
6+
bundle exec rake \
7+
orchestrator:start[postgresql] \
8+
orchestrator:start[redis] \
9+
orchestrator:await_healthy[postgresql] \
10+
orchestrator:await_healthy[redis] \
11+
orchestrator:connect_self
1112

1213
# create connection environment variables
1314
eval $(bundle exec rake orchestrator:create_connection_environment[postgresql,redis])

0 commit comments

Comments
 (0)