Skip to content

Instantly share code, notes, and snippets.

@editicalu
Created February 2, 2023 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save editicalu/a5af64c98e19337ba4c2bc1591093ca0 to your computer and use it in GitHub Desktop.
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
#!/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