-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile improvements and automatic Github Actions builds #14
Dockerfile improvements and automatic Github Actions builds #14
Conversation
@sethforprivacy looks like there's something wrong with the build |
Ah, that is just failing as it relies on pulling the image from GHCR or Docker Hub, neither of which have the image available from your repo yet. The important test succeeded, and the vuln scan will succeed after you've pushed an initial image manually or via these Actions. |
Well that was fast 😄 Let me know if you run into any issues with the builds, happy to help troubleshoot and you know how to reach me directly! |
https://github.com/benjamin-wilson/public-pool/actions/runs/7189355826 Looks like the Docker creds need to be added/updated for it to run (or you can strip out the Docker Hub login + lines pushing to it in the buildx steps) |
🤔 I added them to the repo secrets and the access token as the password, should they go in the environment instead? |
If there it's possible you haven't scoped the access token properly, or you haven't created the repo in Docker Hub (forgot that you have to do that manually!) |
Yeah that's what I did 🤔🤔 |
Oh gotta create the repo! |
Yeah, that's my bad! Totally forgot that it won't automatically create it for you -.- |
This improves the Dockerfile slightly while adding automatic builds via Github Actions to allow you to easily distribute pre-built images.
If that is not something you want, please let me know and I will close this PR and maintain images on my own!
If you do want that, you will need to setup a Docker Hub account (if you wish) or just rely on Github Container Registry. If you want to use Docker Hub, simply create an account, create a Personal Access Token, and add it to the Action Secrets in your repo with the variables
DOCKER_USERNAME
andDOCKER_PASSWORD
.Once added, whenever you push to main/master Github will automatically build and push under the
latest
tag and a tag made of the short SHA of the latest commit (i.e. here).If no changes are made, it will also automatically rebuild and push the images weekly to keep the base image up to date with security patches etc.