Skip to content

Commit f4039a5

Browse files
Create buildspec_amd_only.yml
1 parent 5115150 commit f4039a5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

buildspec_amd_only.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 0.2
2+
3+
phases:
4+
pre_build:
5+
commands:
6+
- echo Logging in to Amazon ECR...
7+
- aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com
8+
- wget https://github.com/docker/buildx/releases/download/v0.9.1/buildx-v0.9.1.linux-amd64
9+
- mkdir -p ~/.docker/cli-plugins
10+
- mv buildx-v0.9.1.linux-amd64 ~/.docker/cli-plugins/docker-buildx
11+
- chmod a+rx ~/.docker/cli-plugins/docker-buildx
12+
- docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
13+
build:
14+
commands:
15+
- echo Build started on `date`
16+
- echo Building the Docker image...
17+
- docker buildx create --use
18+
- docker buildx build --push --platform linux/amd64 -t $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/tibanna-awsf:$IMAGE_TAG --build-arg version=$IMAGE_TAG awsf3-docker/

0 commit comments

Comments
 (0)