GNU Makefile to simplify docker image builds. Supports buildx
- Create
.makerc
cat << EOF > .makerc
IMG_VERSION = 1.0.0
IMG_REPOSITORY = helloworld
IMG REPOSITORY_PREFIX = foo
EOF
- Build Image
make
The following images will be built as a result.
foo/helloworld:1.0.0
foo/helloworld:v1.0.0
foo/helloworld:1.0.0-git-838acf9
foo/helloworld:v1.0.0-git-838acf9
foo/helloworld:latest
- Push Image
make push
- When in doubt append Make option
--dry-run
.