Skip to content

Commit

Permalink
fix bundle permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Dec 12, 2023
1 parent 12ca2d8 commit fa9873b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ RUN apk add --no-cache \
postgresql-dev \
libc6-compat

RUN bundle install --jobs 4 --retry 5
RUN bundle install --jobs 4 --retry 5 && \
chmod -R a+r /usr/local/bundle

# Final stage
FROM base
Expand All @@ -47,12 +48,13 @@ ENV KEYGEN_EDITION="CE" \
PORT="3000" \
BIND="0.0.0.0"

COPY --from=build /usr/local/bundle/ /usr/local/bundle

RUN chmod +x /app/scripts/entrypoint.sh && \
adduser -h /app -u 1000 -s /bin/bash -D keygen && \
adduser -h /app -g keygen -u 1000 -s /bin/bash -D keygen && \
chown -R keygen:keygen /app

COPY --from=build --chown=keygen:keygen \
/usr/local/bundle/ /usr/local/bundle

USER keygen

ENTRYPOINT ["/app/scripts/entrypoint.sh"]
Expand Down

0 comments on commit fa9873b

Please sign in to comment.