Dockerfile best practices #3
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Dockerfile, albeit working has a few issues we should address, either for security, consistency or just for brownie points.
Security
We should add a non-root user to the Dockerfile and run the binary with the permissions of that user.
While not strictly speaking an issue now, we should use good practices from the beginning and copy files into the stages and between the stages explicitly instead of just plainly copying everything around with
COPY . .
.This also has the brownie points benefit of allowing better caching later down the line I think.
Consistency
Our native binaries are named
gitea-account-bot-$VERSION-$ARCH
. So there is no reason why would be diverging from that within the Docker images.⚠️ This is a breaking change for users who are using the Docker image with a custom commandline and
explicitly refer to the executable directly.