Skip to content

Commit

Permalink
Merge pull request #272 from WadeBarnes/feature/arm-mac-workaround
Browse files Browse the repository at this point in the history
Add workaround for Arm based MACs
  • Loading branch information
esune authored Aug 8, 2023
2 parents 4dfeeb1 + 027df22 commit 08787d6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions manage
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/bash
export MSYS_NO_PATHCONV=1

# Set default platform to linux/amd64 when running on Arm based MAC since there are no arm based images available currently.
if [[ $OSTYPE == 'darwin'* ]]; then
architecture=$(uname -m)
if [[ "${architecture}" == 'arm'* ]] || [[ "${architecture}" == 'aarch'* ]]; then
export DOCKER_DEFAULT_PLATFORM=linux/amd64
fi
fi

# getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
export DOCKERHOST=$(getDockerHost)
Expand Down

0 comments on commit 08787d6

Please sign in to comment.