Skip to content

Commit b95346f

Browse files
committed
Script auxiliar para fazer build e push das imagens localmente
1 parent 1ea8a3f commit b95346f

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
docker buildx build \
2+
--platform linux/amd64,linux/arm64 \
3+
--file Dockerfile.base \
4+
--tag ghcr.io/okfn-brasil/querido-diario-data-processing/base:latest \
5+
--cache-from type=registry,ref=ghcr.io/okfn-brasil/querido-diario-data-processing/base:latest \
6+
--cache-to type=inline \
7+
--push \
8+
.
9+
10+
docker buildx build \
11+
--platform linux/amd64 \
12+
--file Dockerfile.base \
13+
--tag ghcr.io/okfn-brasil/querido-diario-data-processing/base:latest-amd64 \
14+
--cache-from type=registry,ref=ghcr.io/okfn-brasil/querido-diario-data-processing/base:latest \
15+
--push \
16+
.
17+
18+
# Build and push ARM64-specific tag
19+
docker buildx build \
20+
--platform linux/arm64 \
21+
--file Dockerfile.base \
22+
--tag ghcr.io/okfn-brasil/querido-diario-data-processing/base:latest-arm64 \
23+
--cache-from type=registry,ref=ghcr.io/okfn-brasil/querido-diario-data-processing/base:latest \
24+
--push \
25+
.
26+
27+
# Build for both architectures and create manifest with multi-arch latest tag
28+
docker buildx build \
29+
--platform linux/amd64,linux/arm64 \
30+
--file Dockerfile \
31+
--tag ghcr.io/okfn-brasil/querido-diario-data-processing:latest \
32+
--cache-from type=registry,ref=ghcr.io/okfn-brasil/querido-diario-data-processing:latest \
33+
--cache-from type=registry,ref=ghcr.io/okfn-brasil/querido-diario-data-processing/base:latest \
34+
--cache-to type=inline \
35+
--push \
36+
.
37+
38+
# Build and push AMD64-specific tag
39+
docker buildx build \
40+
--platform linux/amd64 \
41+
--file Dockerfile \
42+
--tag ghcr.io/okfn-brasil/querido-diario-data-processing:latest-amd64 \
43+
--cache-from type=registry,ref=ghcr.io/okfn-brasil/querido-diario-data-processing:latest \
44+
--cache-from type=registry,ref=ghcr.io/okfn-brasil/querido-diario-data-processing/base:latest \
45+
--push \
46+
.
47+
48+
# Build and push ARM64-specific tag
49+
docker buildx build \
50+
--platform linux/arm64 \
51+
--file Dockerfile \
52+
--tag ghcr.io/okfn-brasil/querido-diario-data-processing:latest-arm64 \
53+
--cache-from type=registry,ref=ghcr.io/okfn-brasil/querido-diario-data-processing:latest \
54+
--cache-from type=registry,ref=ghcr.io/okfn-brasil/querido-diario-data-processing/base:latest \
55+
--push \
56+
.

0 commit comments

Comments
 (0)