Dockerfile best practices #3
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/CI
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: beisel.org/gitea-register-account-bot#3
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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.