Created
September 1, 2021 20:21
-
-
Save akhenakh/2d8055ee12f88b3bfac64d69c69a1907 to your computer and use it in GitHub Desktop.
Get rid of Docker Desktop on M1
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
# Bye Docker on M1 | |
# don't do anything as root | |
brew install lima | |
brew uninstall --ignore-dependencies qemu | |
# Install necessary packages for building | |
brew install libffi gettext glib pkg-config autoconf automake pixman ninja | |
# Clone qemu | |
git clone https://github.com/qemu/qemu | |
# Change directory to qemu repository | |
cd qemu | |
# Checkout to commit dated June 03, 2021 v6.0.0 | |
git checkout 3c93dfa42c394fdd55684f2fbf24cf2f39b97d47 | |
# Apply patch series v8 by Alexander Graf | |
curl https://patchwork.kernel.org/series/485309/mbox/ | git am | |
# Building qemu installer | |
mkdir build && cd build | |
../configure --target-list=aarch64-softmmu --prefix=/opt/homebrew/qemu-m1-patch | |
make -j8 | |
export PATH=$PATH:/opt/homebrew/qemu-m1-patch/bin | |
# if you need Intel Docker emulation | |
brew install qemu | |
rm /opt/homebrew/bin/qemu-system-aarch64 | |
# start another instance named intel and change the arch to x86_64 | |
lime start intel | |
# arch: "x86_64" | |
# then prefix your build with LIMA_INSTANCE=intel | |
LIMA_INSTANCE=intel lima nerdctl build -t akhenakh/myapp -file Dockerfile-backend . | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use colima now