Skip to content

Commit ba844ff

Browse files
committed
patch: use buildx for linux/amd64 docker images
1 parent add5d85 commit ba844ff

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

deployment/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* [AWS account](https://aws.amazon.com/) to create resources
77
* [AWS CLI version 2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) to run scripts
88
* [Git Bash](https://git-scm.com/) to run Bash scripts (only on Windows)
9-
* [Docker version 20.10.5 or later](https://www.docker.com/) and Docker daemon up and running to build and push ECS container images
9+
* [Docker version 20.10.5 or later](https://www.docker.com/) with Docker `buildx` installed and Docker daemon up and running to build and push ECS container images
1010

1111
<br>
1212

deployment/create-stack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ aws cloudformation wait stack-create-complete --stack-name $STACKNAME
2525
if [ $? != 0 ]; then exit 1; fi
2626

2727
printf "\n\nSaving stack outputs...\n"
28-
aws cloudformation describe-stacks --stack-name $STACKNAME > stack.json
28+
aws cloudformation describe-stacks --output json --stack-name $STACKNAME > stack.json
2929

3030
printf "\n\nStack creation complete!\n"

deployment/setup-images.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ printf "\n\nCreating image repository for Stream service...\n"
3131
aws ecr create-repository --repository-name $STREAM_REPOSITORY_NAME
3232
printf "\n\nBuilding and pushing Stream service image...\n"
3333
cd ../serverless/stream-server
34-
docker build -q -t $ECR_REGISTRY/$STREAM_REPOSITORY_NAME:latest .
34+
docker buildx build --platform linux/amd64 -q -t $ECR_REGISTRY/$STREAM_REPOSITORY_NAME:latest .
3535
docker push $ECR_REGISTRY/$STREAM_REPOSITORY_NAME:latest
3636
if [ $? != 0 ]; then exit 1; fi
3737

@@ -40,7 +40,7 @@ printf "\n\nCreating image repository for Transcribe service...\n"
4040
aws ecr create-repository --repository-name $TRANSCRIBE_REPOSITORY_NAME
4141
printf "\n\nBuilding and pushing Transcribe service image...\n"
4242
cd ../transcribe-server && cp -r ../utils ./src/utils
43-
docker build -q -t $ECR_REGISTRY/$TRANSCRIBE_REPOSITORY_NAME:latest .
43+
docker buildx build --platform linux/amd64 -q -t $ECR_REGISTRY/$TRANSCRIBE_REPOSITORY_NAME:latest .
4444
rm -rf ./src/utils
4545
docker push $ECR_REGISTRY/$TRANSCRIBE_REPOSITORY_NAME:latest
4646
if [ $? != 0 ]; then exit 1; fi
@@ -52,7 +52,7 @@ then
5252
aws ecr create-repository --repository-name $TRANSLATE_REPOSITORY_NAME
5353
printf "\n\nBuilding and pushing Translate service image...\n"
5454
cd ../translate-server && cp -r ../utils ./src/utils
55-
docker build -q -t $ECR_REGISTRY/$TRANSLATE_REPOSITORY_NAME:latest .
55+
docker buildx build --platform linux/amd64 -q -t $ECR_REGISTRY/$TRANSLATE_REPOSITORY_NAME:latest .
5656
rm -rf ./src/utils
5757
docker push $ECR_REGISTRY/$TRANSLATE_REPOSITORY_NAME:latest
5858
cd ../../deployment

0 commit comments

Comments
 (0)