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