-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathbuild-prod-images-arm64.sh
More file actions
executable file
·47 lines (41 loc) · 1.41 KB
/
build-prod-images-arm64.sh
File metadata and controls
executable file
·47 lines (41 loc) · 1.41 KB
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
#!/bin/bash
set -e
# Accept tag as first argument, default to 'latest' if not provided
TAG="${1:-latest}"
echo "Using image tag: $TAG"
echo "Using platforms: linux/arm64"
# Build and push amd64 and arm64 images using buildx (multi-arch, same tag)
echo "Building and pushing multi-arch images (linux/arm64) with buildx..."
DOCKER_BUILDKIT=1 docker buildx build \
--platform linux/arm64 \
--no-cache \
-f Dockerfile.frontend \
--target prod \
--build-arg VITE_SOKETI_PORT \
--build-arg VITE_SOKETI_KEY \
--build-arg VITE_SENTRY_DSN_SECRET \
--build-arg VITE_SENTRY_DSN_PROJECT_ID \
--build-arg VITE_SENTRY_AUTH_TOKEN \
--build-arg VITE_SENTRY_ORG \
--build-arg VITE_SENTRY_PROJET \
--build-arg VITE_SENTRY_URL \
--build-arg VITE_SENTRY_ENABLED \
--build-arg VITE_VERSION \
--build-arg VITE_IS_SELF_HOSTED=true \
-t antoinedc44/ethernal-frontend:$TAG \
--push .
DOCKER_BUILDKIT=1 docker buildx build \
--platform linux/arm64 \
-f Dockerfile.backend \
-t antoinedc44/ethernal-backend:$TAG \
--push .
DOCKER_BUILDKIT=1 docker buildx build \
--platform linux/arm64 \
-f Dockerfile.pm2 \
--target prod \
-t antoinedc44/ethernal-pm2:$TAG \
--push .
echo "All production images built & pushed successfully:"
echo " ethernal-frontend:$TAG (linux/arm64)"
echo " ethernal-backend:$TAG (linux/arm64)"
echo " ethernal-pm2:$TAG (linux/arm64)"