Created
August 24, 2023 15:18
-
-
Save profnandaa/e86d6c4fa48ba759e4bc09acc587e880 to your computer and use it in GitHub Desktop.
Setup Buildkit on Windows
This file contains hidden or 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
quick instructions | |
================== | |
you will need https://github.com/containerd/containerd/releases/tag/v1.7.3 | |
installed and running with default config | |
you will also need a proper CNI installed | |
https://gist.github.com/gabriel-samfira/c1d060fc07156cfa1e00e7cef8e7fb1c | |
i usually use this to set up containerd | |
after you have containerd installed you will need buildkit\ | |
git clone https://github.com/moby/buildkit.git | |
cd buildkit | |
git remote add gabriel-samfira https://github.com/gabriel-samfira/buildkit/ | |
git fetch gabriel-samfira | |
git checkout master | |
git branch staging | |
git checkout staging | |
git merge enable-windows-executor | |
git merge fileop-read-user | |
go install .\cmd\... | |
buildkitd.exe --debug --containerd-worker=true --containerd-cni-config-path='C:/Program Files/containerd/cni/conf/0-containerd-nat.conf' --containerd-cni-binary-dir='C:/Program Files/containerd/cni/bin' --service-name buildkitd --register-service | |
this will install the buildkit service | |
start-service containerd | |
start-service buildkitd | |
and you should be all set | |
to build a Dockerfile that resides in your current folder, you can run: | |
buildctl.exe build --output type=image,name=docker.samfira.com/test,push=false --progress plain --frontend=dockerfile.v0 --local context=. --local dockerfile=. | |
change the image name to something else if you wish | |
if you want the standard buildkit progress, remove --progress plain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment