Skip to content

Commit d1b57e5

Browse files
committed
only do arm64 images from now on
1 parent 390a8f8 commit d1b57e5

1 file changed

Lines changed: 5 additions & 26 deletions

File tree

docker-build.sh

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,29 @@
22

33
# Usage: ./docker-build.sh [tag]
44
# Examples:
5-
# ./docker-build.sh # Uses default tag 'latest' (creates multi-arch manifest)
6-
# ./docker-build.sh staging # Creates :staging-amd64, :staging-arm64, and :staging manifest
7-
# ./docker-build.sh v1.2.3 # Creates :v1.2.3-amd64, :v1.2.3-arm64, and :v1.2.3 manifest
5+
# ./docker-build.sh # Uses default tag 'latest'
6+
# ./docker-build.sh staging # Creates :staging
7+
# ./docker-build.sh v1.2.3 # Creates :v1.2.3
88

99
# Configuration
1010
AWS_REGION=${AWS_REGION:-us-east-2}
1111
ECR_REPO="633607774026.dkr.ecr.${AWS_REGION}.amazonaws.com/back-end"
1212
TAG=${1:-latest}
1313

14-
echo "Building and pushing with tag: ${TAG}"
14+
echo "Building and pushing ARM64 image with tag: ${TAG}"
1515
echo "ECR Repository: ${ECR_REPO}"
1616

1717
# Refresh AWS ECR login
1818
echo "Refreshing AWS ECR login for region ${AWS_REGION}..."
1919
aws ecr get-login-password --region ${AWS_REGION} | \
2020
docker login --username AWS --password-stdin 633607774026.dkr.ecr.${AWS_REGION}.amazonaws.com
2121

22-
# Build and push AMD64 image using buildx with provenance disabled
23-
docker buildx build \
24-
--platform linux/amd64 \
25-
--tag ${ECR_REPO}:${TAG}-amd64 \
26-
--provenance=false \
27-
--push .
28-
2922
# Build and push ARM64 image using buildx with provenance disabled
3023
docker buildx build \
3124
--platform linux/arm64 \
32-
--tag ${ECR_REPO}:${TAG}-arm64 \
25+
--tag ${ECR_REPO}:${TAG} \
3326
--provenance=false \
3427
--push .
3528

36-
# Remove existing manifest list if it exists
37-
docker manifest rm ${ECR_REPO}:${TAG} || true
38-
39-
# Create manifest list
40-
docker manifest create \
41-
${ECR_REPO}:${TAG} \
42-
${ECR_REPO}:${TAG}-amd64 \
43-
${ECR_REPO}:${TAG}-arm64
44-
45-
docker manifest inspect ${ECR_REPO}:${TAG}
46-
47-
# Push the manifest
48-
docker manifest push ${ECR_REPO}:${TAG}
49-
5029
echo ""
5130
echo "Successfully pushed: ${ECR_REPO}:${TAG}"

0 commit comments

Comments
 (0)