From 2d145137c5782c740980c63f83fb8783eca6a895 Mon Sep 17 00:00:00 2001 From: Nat Budin Date: Mon, 11 Sep 2023 18:32:54 -0700 Subject: [PATCH] Be user we wanna be --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 017531c..2e3a157 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,12 +46,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y libpq5 nodejs && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives -# Copy built artifacts: gems, application -COPY --from=build /usr/local/bundle /usr/local/bundle -COPY --from=build --chown=rails:rails /rails /rails - # Run and own only the runtime files as a non-root user for security RUN useradd rails --create-home --shell /bin/bash USER rails:rails +# Copy built artifacts: gems, application +COPY --from=build /usr/local/bundle /usr/local/bundle +COPY --from=build --chown=rails:rails /rails /rails + CMD bundle exec bin/rails server -p $PORT -b 0.0.0.0