Skip to content

Commit

Permalink
fix: suppress warning msg mix of host platform
Browse files Browse the repository at this point in the history
Added the flag `--platform linux/amd64` in some docker run/build
commands.

Closes #20
  • Loading branch information
DavidCardoso committed Sep 14, 2023
1 parent 76436ae commit 5d7e34b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions bin/gcloud
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ WORKDIR=/app

# run from your working directory
docker run -it --rm \
--platform linux/amd64 \
--volume $PWD:$WORKDIR \
--volumes-from gcloud-config \
--workdir $WORKDIR \
Expand Down
1 change: 1 addition & 0 deletions bin/gcloud-login
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fi

# run from your working directory
docker run -it \
--platform linux/amd64 \
--volume $PWD:$WORKDIR \
--workdir $WORKDIR \
--entrypoint gcloud \
Expand Down
1 change: 1 addition & 0 deletions bin/serverless
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ fi

# run from your working directory
docker run -it --rm \
--platform linux/amd64 \
--name serverless-cli \
--env AWS_PROFILE=$AWS_PROFILE \
--env AWS_SDK_LOAD_CONFIG=1 \
Expand Down
1 change: 1 addition & 0 deletions bin/speedtest
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ IMAGE=davidcardoso/docker-speedtest:latest

# run from your working directory
docker run -it --rm \
--platform linux/amd64 \
$IMAGE "${@}"
1 change: 1 addition & 0 deletions bin/terraform
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ EOF

# run from your working directory
docker run -it --rm \
--platform linux/amd64 \
--name terraform-cli \
--env AWS_PROFILE=${AWS_PROFILE} \
--volume ${HOME}/.aws:/root/.aws \
Expand Down
4 changes: 3 additions & 1 deletion docker/aws-sso-cred/build
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ echo "=========================================================="
echo "Building '${IMAGE}'..."
echo "=========================================================="

docker build --tag ${IMAGE} .
docker build \
--platform linux/amd64 \
--tag ${IMAGE} .
4 changes: 3 additions & 1 deletion docker/serverless/build
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ echo "=========================================================="
echo "Building '${IMAGE}'..."
echo "=========================================================="

docker build --tag ${IMAGE} .
docker build \
--platform linux/amd64 \
--tag ${IMAGE} .
1 change: 1 addition & 0 deletions docker/speedtest/build
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ echo "Building '${IMAGE}'..."
echo "=========================================================="

docker build \
--platform linux/amd64 \
--build-arg VERSION=${SPEEDTEST_VERSION} \
--tag ${IMAGE} \
.

0 comments on commit 5d7e34b

Please sign in to comment.