aboutsummaryrefslogtreecommitdiff
path: root/docker-bake.hcl
blob: 04eedf14b6cf342c9aa62087258c2f5b1dbc93c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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-base", "alpine-spa", "alpine-autoindex"]
}
group "alpine-base" {
    targets = ["alpine-mainline", "alpine-stable"]
}
group "alpine-spa" {
    targets = ["alpine-mainline-spa", "alpine-stable-spa"]
}
group "alpine-autoindex" {
    targets = ["alpine-mainline-autoindex", "alpine-stable-autoindex"]
}

target "alpine-mainline" {
    context = "alpine/base/"
    args = {
        ALPINE_VER="${ALPINE_VER}"
        NGINX_VER="${NGINX_MAINLINE}"
        CORE_COUNT="${CORE_COUNT}"
    }
    platforms = ["linux/amd64", "linux/386", "linux/arm/v6", "linux/arm/v7", "linux/arm64"]
    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/base/"
    args = {
        ALPINE_VER="${ALPINE_VER}"
        NGINX_VER="${NGINX_STABLE}"
        CORE_COUNT="${CORE_COUNT}"
    }
    platforms = ["linux/amd64", "linux/386", "linux/arm/v6", "linux/arm/v7", "linux/arm64"]
    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}",
    ]
}

target "alpine-mainline-spa" {
    context = "alpine/spa/"
    args = {
        ALPINE_VER="${ALPINE_VER}"
        NGINX_VER="${NGINX_MAINLINE}"
        CORE_COUNT="${CORE_COUNT}"
    }
    platforms = ["linux/amd64", "linux/386", "linux/arm/v6", "linux/arm/v7", "linux/arm64"]
    tags = [
        "${REGISTRY}/nginx:spa",
        "${REGISTRY}/nginx:alpine-spa",
        "${REGISTRY}/nginx:alpine${ALPINE_VER}-spa",
        "${REGISTRY}/nginx:mainline-spa",
        "${REGISTRY}/nginx:mainline-alpine-spa",
        "${REGISTRY}/nginx:mainline-alpine${ALPINE_VER}-spa",
        "${REGISTRY}/nginx:${NGINX_MAINLINE}-spa",
        "${REGISTRY}/nginx:${NGINX_MAINLINE}-alpine-spa",
        "${REGISTRY}/nginx:${NGINX_MAINLINE}-alpine${ALPINE_VER}-spa",
    ]
}

target "alpine-stable-spa" {
    context = "alpine/spa/"
    args = {
        ALPINE_VER="${ALPINE_VER}"
        NGINX_VER="${NGINX_STABLE}"
        CORE_COUNT="${CORE_COUNT}"
    }
    platforms = ["linux/amd64", "linux/386", "linux/arm/v6", "linux/arm/v7", "linux/arm64"]
    tags = [
        "${REGISTRY}/nginx:stable-spa",
        "${REGISTRY}/nginx:stable-alpine-spa",
        "${REGISTRY}/nginx:stable-alpine${ALPINE_VER}-spa",
        "${REGISTRY}/nginx:${NGINX_STABLE}-spa",
        "${REGISTRY}/nginx:${NGINX_STABLE}-alpine-spa",
        "${REGISTRY}/nginx:${NGINX_STABLE}-alpine${ALPINE_VER}-spa",
    ]
}

target "alpine-mainline-autoindex" {
    context = "alpine/autoindex/"
    args = {
        ALPINE_VER="${ALPINE_VER}"
        NGINX_VER="${NGINX_MAINLINE}"
        CORE_COUNT="${CORE_COUNT}"
    }
    platforms = ["linux/amd64", "linux/386", "linux/arm/v6", "linux/arm/v7", "linux/arm64"]
    tags = [
        "${REGISTRY}/nginx:autoindex",
        "${REGISTRY}/nginx:alpine-autoindex",
        "${REGISTRY}/nginx:alpine${ALPINE_VER}-autoindex",
        "${REGISTRY}/nginx:mainline-autoindex",
        "${REGISTRY}/nginx:mainline-alpine-autoindex",
        "${REGISTRY}/nginx:mainline-alpine${ALPINE_VER}-autoindex",
        "${REGISTRY}/nginx:${NGINX_MAINLINE}-autoindex",
        "${REGISTRY}/nginx:${NGINX_MAINLINE}-alpine-autoindex",
        "${REGISTRY}/nginx:${NGINX_MAINLINE}-alpine${ALPINE_VER}-autoindex",
    ]
}

target "alpine-stable-autoindex" {
    context = "alpine/autoindex/"
    args = {
        ALPINE_VER="${ALPINE_VER}"
        NGINX_VER="${NGINX_STABLE}"
        CORE_COUNT="${CORE_COUNT}"
    }
    platforms = ["linux/amd64", "linux/386", "linux/arm/v6", "linux/arm/v7", "linux/arm64"]
    tags = [
        "${REGISTRY}/nginx:stable-autoindex",
        "${REGISTRY}/nginx:stable-alpine-autoindex",
        "${REGISTRY}/nginx:stable-alpine${ALPINE_VER}-autoindex",
        "${REGISTRY}/nginx:${NGINX_STABLE}-autoindex",
        "${REGISTRY}/nginx:${NGINX_STABLE}-alpine-autoindex",
        "${REGISTRY}/nginx:${NGINX_STABLE}-alpine${ALPINE_VER}-autoindex",
    ]
}