This template builds a docker image ๐ณ and publishes to DockerHub or GitHub Container Registry, using GitHub Actions.
- Customize the code of
Dockerfile
- Prepare a docker host: DockerHub or a token for GitHub Container Registry
- Customize the build-push action in
.github/workflows/docker-image.yaml
, in particular:- use correct DockerHub credentials and add them to your repository secrets, as
DOCKER_USER
andDOCKER_PASSWORD
for DockerHub andPAT
for Container Registry, respectively. - make sure that
IMAGE_NAME
matches the repo name on DockerHub
- use correct DockerHub credentials and add them to your repository secrets, as
- The workflow is (by default) run either when the code of the docker file or action script gets changed, or when triggered manually.
This repo has been created for educational purposes. Building and publishing docker image is here done with direct Docker commands, but can be also automatized with dedicated GitHub Actions.