Created
February 2, 2023 08:58
-
-
Save editicalu/a5af64c98e19337ba4c2bc1591093ca0 to your computer and use it in GitHub Desktop.
Script to switch between apple silicon-based docker and intel one, given the two exist as a lima context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -eq 0 ] | |
then | |
docker context list | |
else | |
# This could be written better | |
limactl stop applesilicon & | |
limactl stop intel & | |
wait | |
limactl start $1 | |
docker context use $1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment