Skip to content

Instantly share code, notes, and snippets.

@jjtroberts
Created December 7, 2022 16:36
Show Gist options
  • Save jjtroberts/80ec6fde67147e8782de7872738f5d61 to your computer and use it in GitHub Desktop.
Save jjtroberts/80ec6fde67147e8782de7872738f5d61 to your computer and use it in GitHub Desktop.
zshrc docker aliases for arm64
docker() {
if [[ `uname -m` == "arm64" ]] && [[ "$1" == "run" || "$1" == "build" || "$1" == "pull" ]]; then
/usr/local/bin/docker "$1" --platform linux/amd64 "${@:2}"
else
/usr/local/bin/docker "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment