diff options
Diffstat (limited to 'docker-bake.hcl')
-rw-r--r-- | docker-bake.hcl | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/docker-bake.hcl b/docker-bake.hcl new file mode 100644 index 0000000..d1caa67 --- /dev/null +++ b/docker-bake.hcl @@ -0,0 +1,50 @@ +variable "ALPINE_VER" { default = "UNSET" } +variable "NGINX_MAINLINE" { default = "UNSET" } +variable "NGINX_STABLE" { default = "UNSET" } +variable "CORE_COUNT" { default = "1" } +variable "REGISTRY" { default = "local" } + +group "default" { + targets = ["alpine"] +} +group "alpine" { + targets = ["alpine-mainline", "alpine-stable"] +} + + +target "alpine-mainline" { + context = "alpine/" + args = { + ALPINE_VER="${ALPINE_VER}" + NGINX_VER="${NGINX_MAINLINE}" + CORE_COUNT="${CORE_COUNT}" + } + tags = [ + "${REGISTRY}/nginx:latest", + "${REGISTRY}/nginx:alpine", + "${REGISTRY}/nginx:alpine${ALPINE_VER}", + "${REGISTRY}/nginx:mainline", + "${REGISTRY}/nginx:mainline-alpine", + "${REGISTRY}/nginx:mainline-alpine${ALPINE_VER}", + "${REGISTRY}/nginx:${NGINX_MAINLINE}", + "${REGISTRY}/nginx:${NGINX_MAINLINE}-alpine", + "${REGISTRY}/nginx:${NGINX_MAINLINE}-alpine${ALPINE_VER}", + ] +} + +target "alpine-stable" { + context = "alpine/" + args = { + ALPINE_VER="${ALPINE_VER}" + NGINX_VER="${NGINX_STABLE}" + CORE_COUNT="${CORE_COUNT}" + } + tags = [ + "${REGISTRY}/nginx:stable", + "${REGISTRY}/nginx:stable-alpine", + "${REGISTRY}/nginx:stable-alpine${ALPINE_VER}", + "${REGISTRY}/nginx:${NGINX_STABLE}", + "${REGISTRY}/nginx:${NGINX_STABLE}-alpine", + "${REGISTRY}/nginx:${NGINX_STABLE}-alpine${ALPINE_VER}", + ] +} |