aboutsummaryrefslogtreecommitdiff
path: root/docker-bake.hcl
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2022-02-14 18:11:28 -0500
committerGalen Guyer <galen@galenguyer.com>2022-02-14 18:11:28 -0500
commitb97b649cb3fe2217e46800e5bfc649ff20076625 (patch)
tree613d5e5edcaa5b84ff45bda35430be698e91911d /docker-bake.hcl
alpine: builds for mainline and stable
Diffstat (limited to 'docker-bake.hcl')
-rw-r--r--docker-bake.hcl50
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}",
+ ]
+}