Skip to content

Commit

Permalink
feat(docker): run docker image as non-root with 'akhq' user (tchiotlu…
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-chauvet authored Nov 6, 2020
1 parent 7a14c0e commit 552a9eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ FROM openjdk:11-jre-slim
WORKDIR /app
COPY docker /
ENV MICRONAUT_CONFIG_FILES=/app/application.yml
USER 10001
# Create user
RUN useradd -ms /bin/bash akhq
# Chown to write configuration
RUN chown -R akhq /app
# Use the 'akhq' user
USER akhq
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["./akhq"]

0 comments on commit 552a9eb

Please sign in to comment.