Skip to content

Commit

Permalink
fix: user set in dockerfile
Browse files Browse the repository at this point in the history
my organization is currently auditing whether any docker images we run
are currently using the root user. From dockerhub it looks like this
line expands out to `USER :` since the env var names don't match. (see
https://hub.docker.com/layers/hashicorp/consul-template/0.29/images/sha256-32f8ffb8db51809d93488527d63f97d267e2a10c0cbe96dfa5cbc408266211ab?context=explore)
This would fix this so that your images are run as the user you create
earlier in the dockerfile.
  • Loading branch information
Matt Hughes authored and eikenb committed Nov 2, 2022
1 parent 90370e0 commit 7647b78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ COPY ./dist/$TARGETOS/$TARGETARCH/$BIN_NAME /bin/
COPY ./.release/docker-entrypoint.sh /bin/
ENTRYPOINT ["/bin/docker-entrypoint.sh"]

USER ${NAME}:${NAME}
USER ${BIN_NAME}:${BIN_NAME}
CMD /bin/$BIN_NAME

0 comments on commit 7647b78

Please sign in to comment.