Skip to content

Commit f67f8ee

Browse files
authored
feat: support arm64 and alpine docker images (#101)
* feat: support arm64 and alpine docker images (#100) * feat: support arm64 docker images * feat: support more alpine images * fix: add arm64 and alpine images * feat: add alpine images to ci * docs: update readme * remove condition to test * add output = [type=registry] * remove --load option
1 parent 81b4f3f commit f67f8ee

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
build:
2424
strategy:
2525
matrix:
26-
target: [ "all", "20", "19", "18", "17", "16", "16-alpine", "15", "14", "13", "12", "11", "10", "9", "8", "7"]
26+
target: [ "all", "20", "20-alpine", "19", "19-alpine", "18", "18-alpine", "17", "17-alpine", "16", "16-alpine", "15", "14", "13", "12", "11", "10", "9", "8", "7"]
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: actions/checkout@v4
@@ -43,8 +43,7 @@ jobs:
4343
run: docker buildx bake --file docker-bake.hcl --print
4444

4545
- name: Build image for tag ${{ matrix.target }}
46-
if: github.ref == 'refs/heads/master'
47-
run: docker buildx bake --file docker-bake.hcl ${{ matrix.target }} --load
46+
run: docker buildx bake --file docker-bake.hcl ${{ matrix.target }}
4847

4948
- name: Publish image for tag ${{ matrix.target }}
5049
if: github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch'

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ You can access all available Clang Tools Docker images via [Docker Hub registry
1414

1515
* [`all`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.all) (Supports versions of clang-tools includes `20`, `19`, `18`, `17`, `16`, `15`, `14`, `13`, `12`, `11`, `10`, `9`)
1616
* [`20`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile)
17+
* [`20-alpine`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.alpine)
1718
* [`19`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile)
19+
* [`19-alpine`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.alpine)
1820
* [`18`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile)
21+
* [`18-alpine`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.alpine)
1922
* [`17`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile)
23+
* [`17-alpine`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.alpine)
2024
* [`16`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile)
2125
* [`16-alpine`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.alpine)
2226
* [`15`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile)

docker-bake.hcl

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ group "default" {
33
targets = [
44
"all",
55
"20",
6+
"20-alpine",
67
"19",
8+
"19-alpine",
79
"18",
10+
"18-alpine",
811
"17",
12+
"17-alpine",
913
"16",
1014
"16-alpine",
1115
"15",
@@ -40,7 +44,8 @@ target "all" {
4044
"${DOCKER_REPO}:all",
4145
"${GITHUB_REPO}:all"
4246
]
43-
platforms = ["linux/amd64"]
47+
platforms = ["linux/amd64", "linux/arm64"]
48+
output = ["type=registry"]
4449
}
4550

4651
target "clang-tools" {
@@ -59,7 +64,8 @@ target "clang-tools" {
5964
"${DOCKER_REPO}:${tgt}",
6065
"${GITHUB_REPO}:${tgt}"
6166
]
62-
platforms = ["linux/amd64"]
67+
platforms = ["linux/amd64", "linux/arm64"]
68+
output = ["type=registry"]
6369
}
6470

6571
target "clang-tools" {
@@ -78,7 +84,8 @@ target "clang-tools" {
7884
"${DOCKER_REPO}:${tgt}",
7985
"${GITHUB_REPO}:${tgt}"
8086
]
81-
platforms = ["linux/amd64"]
87+
platforms = ["linux/amd64", "linux/arm64"]
88+
output = ["type=registry"]
8289
}
8390

8491
target "clang-tools" {
@@ -97,7 +104,8 @@ target "clang-tools" {
97104
"${DOCKER_REPO}:${tgt}",
98105
"${GITHUB_REPO}:${tgt}"
99106
]
100-
platforms = ["linux/amd64"]
107+
platforms = ["linux/amd64", "linux/arm64"]
108+
output = ["type=registry"]
101109
}
102110

103111
target "clang-tools" {
@@ -115,7 +123,8 @@ target "clang-tools" {
115123
"${DOCKER_REPO}:${tgt}",
116124
"${GITHUB_REPO}:${tgt}"
117125
]
118-
platforms = ["linux/amd64"]
126+
platforms = ["linux/amd64", "linux/arm64"]
127+
output = ["type=registry"]
119128
}
120129

121130
target "clang-tools" {
@@ -133,7 +142,8 @@ target "clang-tools" {
133142
"${DOCKER_REPO}:${tgt}",
134143
"${GITHUB_REPO}:${tgt}"
135144
]
136-
platforms = ["linux/amd64"]
145+
platforms = ["linux/amd64", "linux/arm64"]
146+
output = ["type=registry"]
137147
}
138148

139149
target "clang-tools" {
@@ -151,12 +161,13 @@ target "clang-tools" {
151161
"${DOCKER_REPO}:${tgt}",
152162
"${GITHUB_REPO}:${tgt}"
153163
]
154-
platforms = ["linux/amd64"]
164+
platforms = ["linux/amd64", "linux/arm64"]
165+
output = ["type=registry"]
155166
}
156167

157168
target "clang-tools" {
158169
matrix = {
159-
tgt = ["16-alpine"]
170+
tgt = ["16-alpine", "17-alpine", "18-alpine", "19-alpine", "20-alpine"]
160171
}
161172
name = "${tgt}"
162173
dockerfile = "Dockerfile.alpine"
@@ -169,5 +180,6 @@ target "clang-tools" {
169180
"${DOCKER_REPO}:${tgt}",
170181
"${GITHUB_REPO}:${tgt}"
171182
]
172-
platforms = ["linux/amd64"]
183+
platforms = ["linux/amd64", "linux/arm64"]
184+
output = ["type=registry"]
173185
}

0 commit comments

Comments
 (0)