在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:sergeycherepanov/homebrew-docker-virtualbox开源软件地址:https://github.com/sergeycherepanov/homebrew-docker-virtualbox开源编程语言:Shell 75.8%开源软件介绍:Homebrew Docker Virtualbox (But not VirtualBox only)This formula resolves the Docker issue on AMD based MacOS (Ryzentosh). Also can be used on any Mac. InstallationInstall Virtualbox from Oracle websitehttps://www.virtualbox.org/wiki/Downloads.
Virtualbox 6.1.28+ NoteDue the changes of virtualbox networking, you need to allow docker-machine host in order to use 192.168.99.0/8 network. More Details Add this line into
* 192.168.99.0/8 Install the docker-virtualbox via Homebrewbrew tap sergeycherepanov/docker-virtualbox
brew install docker-virtualbox Configure the docker-virtualbox requirements
Ensure the NFS exports file exists sudo touch /etc/exports Allow the staff group to configure NFS shares and run the balancer without a password prompt sudo tee /etc/sudoers.d/docker-machine-nfs <<SUDOERS
%staff ALL=(ALL) NOPASSWD: /sbin/nfsd
%staff ALL=(ALL) NOPASSWD: /bin/cp /etc/nfs.conf /etc/nfs.conf.bak
%staff ALL=(ALL) NOPASSWD: /usr/bin/tee /etc/exports
%staff ALL=(ALL) NOPASSWD: /usr/bin/tee /etc/nfs.conf
%staff ALL=(ALL) NOPASSWD: $(brew --prefix)/opt/docker-virtualbox/bin/gobetween
SUDOERS
Configure the environmentIf you didn't install Docker for Mac you can link binaries instead of PATH update
Otherwise configure the PATH variable # For the bash
echo "export PATH=\"$(brew --prefix docker-virtualbox)/bin:\$PATH\"" >> ~/.bash_profile
# For the zsh
echo "export PATH=\"$(brew --prefix docker-virtualbox)/bin:\$PATH\"" >> ~/.zshrc Reload the shell
Initialize the docker machineIn the first run according to the permissions policy you need to run it manually and approve permissions. docker-machine-init initialize
Start the docker-virtualbox serviceWhen initialization will be finished you are ready to enable the service
brew services start docker-virtualbox Verify installationTest the Docker by running Nginx docker run -d -p 8989:80 nginx
curl -v localhost:8989 Additional informationIf you don't want to use the VirtualBox as docker-machine driver you need to create a machine manually before initialization by similar command: docker-machine create --driver generic --generic-ip-address=192.168.24.108 --generic-ssh-user=developer --generic-ssh-key=$HOME/.ssh/id_rsa docker
Read the log when the docker doesn't work properly tail -n 1000 -f /tmp/docker-virtualbox.log SSH connection to the docker-machine docker-machine ssh docker To stop the service just run brew services stop docker-virtualbox To setup environment for 3rd party tools (
Known issues
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论