|
25 | 25 | # No override - detect from current machine
|
26 | 26 | MACHINE_ARCH=$(uname -m)
|
27 | 27 | case "${MACHINE_ARCH}" in
|
28 |
| - x86_64) PLATFORM="linux/amd64" ;; |
29 |
| - aarch64) PLATFORM="linux/arm64" ;; |
30 |
| - arm64) PLATFORM="linux/arm64" ;; |
31 |
| - *) echo "Unsupported machine architecture: ${MACHINE_ARCH}" && exit 1 ;; |
| 28 | + x86_64) PLATFORM="linux/amd64" ;; |
| 29 | + aarch64) PLATFORM="linux/arm64" ;; |
| 30 | + arm64) PLATFORM="linux/arm64" ;; |
| 31 | + *) echo "Unsupported machine architecture: ${MACHINE_ARCH}" && exit 1 ;; |
32 | 32 | esac
|
33 | 33 | fi
|
34 | 34 |
|
35 | 35 | # Convert platform to short architecture name for file naming
|
36 | 36 | case "${PLATFORM}" in
|
37 |
| - linux/amd64) ARCH="amd64" ;; |
38 |
| - linux/arm64) ARCH="arm64" ;; |
39 |
| - *) echo "Unsupported platform: ${PLATFORM}" && exit 1 ;; |
| 37 | + linux/amd64) ARCH="amd64" ;; |
| 38 | + linux/arm64) ARCH="arm64" ;; |
| 39 | + *) echo "Unsupported platform: ${PLATFORM}" && exit 1 ;; |
40 | 40 | esac
|
41 | 41 |
|
42 |
| -# Define single tag to avoid collisions and redundancy |
43 |
| -TAG="boulder:${VERSION}-${ARCH}" |
44 |
| - |
45 | 42 | # Create platform-specific image
|
| 43 | +# Keep generic tags for standalone use |
46 | 44 | docker buildx build \
|
47 | 45 | --file Containerfile \
|
48 | 46 | --platform "$PLATFORM" \
|
49 | 47 | --build-arg "COMMIT_ID=${COMMIT_ID}" \
|
50 | 48 | --build-arg "GO_VERSION=${GO_VERSION}" \
|
51 | 49 | --build-arg "VERSION=${VERSION}" \
|
52 |
| - --tag "${TAG}" \ |
| 50 | + --tag "boulder:${VERSION}-${ARCH}" \ |
| 51 | + --tag "boulder:${VERSION}" \ |
| 52 | + --tag "boulder" \ |
53 | 53 | --load \
|
54 | 54 | --progress=plain \
|
55 | 55 | .
|
|
0 commit comments