docker-machine-driver-hyperkit
docker-machine-driver-hyperkit copied to clipboard
docker-machine tweaks in support of PR #13
Depends on #13
Tested against docker-machine.
This has been tested and works with minikube as well. I'm would be happy for this to get merged and to abandon my PR.
Can we merge this?
Any chance this will be merged?
Can verify that this now makes docker-machine create --driver hyperkit usable on MacOS :)
Hi @zazula Did you manage to start some container in hyperkit docker-machine with this changes?
I got the error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:109: jailing process inside rootfs caused \\\"pivot_root invalid argument\\\"\"": unknown.
Hi @zazula Did you manage to start some container in hyperkit docker-machine with this changes?
I got the error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:109: jailing process inside rootfs caused \\\"pivot_root invalid argument\\\"\"": unknown.
Try adding this to your docker-machine command:
--engine-env DOCKER_RAMDISK=true
Try adding this to your docker-machine command:
--engine-env DOCKER_RAMDISK=true
Strange, but with this env I even can't pull image, btw it works normally on vbox machine:
docker pull alpine
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Try adding this to your docker-machine command: --engine-env DOCKER_RAMDISK=true
Strange, but with this env I even can't pull image, btw it works normally on vbox machine:
docker pull alpine Using default tag: latest Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Try with my clone of the repo here:
https://github.com/zazula/docker-machine-driver-hyperkit
brew install golang dep
go get github.com/zazula/docker-machine-driver-hyperkit
cd ~/go/src/github.com/zazula/docker-machine-driver-hyperkit
make build
docker-machine -D create --driver hyperkit --engine-env DOCKER_RAMDISK=true --hyperkit-cpu-count 12 --hyperkit-disk-size 40960 --hyperkit-memory-size 16192 local
[...]
then
$eval $(docker-machine env local)
$docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
188c0c94c7c5: Pull complete
Digest: sha256:c0e9560cda118f9ec63ddefb4a173a2b2a0347082d7dff7dc14272e7841a5b5a
Status: Downloaded newer image for alpine:latest
docker.io/library/alpine:latest
$ docker run -it alpine sh
/ # ls
bin etc lib mnt proc run srv tmp var
dev home media opt root sbin sys usr
/ # exit
Also, make sure your hyperkit binary is setuid root
Also, make sure your
hyperkitbinary is setuidroot
It looks like it was trouble with my host /etc/resolv.conf, so docker-machine couldn't access internet. At this time I was able to run containers 🎉
One note: I had to run make build with CGO_ENABLED=1 due to an error: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: Function not supported on CGO_ENABLED=0 binaries
Anyway thx! Now I got significant increase mount host filesystem performance 🥳
Also, make sure your
hyperkitbinary is setuidrootIt looks like it was trouble with my host /etc/resolv.conf, so docker-machine couldn't access internet. At this time I was able to run containers 🎉 One note: I had to run
make buildwith CGO_ENABLED=1 due to an error:Error creating machine: Error in driver during machine creation: getting MAC address from UUID: Function not supported on CGO_ENABLED=0 binariesAnyway thx! Now I got significant increase mount host filesystem performance 🥳
Great! I don't recall doing anything with the CGO_ENABLED flag but glad you have it working.
I'm working on some fixes for NFS mounts and exposing some of the NFS config flags as --hyperkit-nfs-xxx
hi, can someone provide an update on this ?