-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.sh
More file actions
39 lines (30 loc) Β· 1.05 KB
/
publish.sh
File metadata and controls
39 lines (30 loc) Β· 1.05 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
#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
# Configuration
IMAGE_NAME="trigen/dev-container"
PLATFORM="linux/amd64"
echo "π Starting build process for platform: $PLATFORM..."
# ---------------------------------------------------------
# Step 1: Build and Push the main image (latest)
# ---------------------------------------------------------
echo "π¦ [1/2] Building and pushing $IMAGE_NAME:latest..."
docker buildx build \
--platform "$PLATFORM" \
--tag "$IMAGE_NAME:latest" \
--file Dockerfile \
--push \
.
echo "β
$IMAGE_NAME:latest pushed successfully."
# ---------------------------------------------------------
# Step 2: Build and Push the tunnel image
# ---------------------------------------------------------
echo "π [2/2] Building and pushing $IMAGE_NAME:tunnel..."
docker buildx build \
--platform "$PLATFORM" \
--tag "$IMAGE_NAME:tunnel" \
--file Dockerfile.tunnel \
--push \
.
echo "β
$IMAGE_NAME:tunnel pushed successfully."
echo "π All images have been built and published!"