Any conflicts using Docker Toolbox for Mac and Already-Installed Virtualbox? - macos

I have Virtualbox already installed on a Mac El Capitan machine running several VMs that I need to continue to use. I understand that Docker Toolbox will install its own Virtualbox.
I'd like to not disrupt my existing VMs. Is there any possibility that the two Virtualbox installations would conflict and if so, are there any known remedies?

I just installed Docker Toolbox on my Macbook Pro running El Captian 10.11.4. I had VirtualBox 5.0.8 already installed and working properly. When Docker Toolbox automatically recognized this VirtualBox installation and started using it without any problems.

You don't have to install docker toolbox: you can install docker machine and kinematic separately.
docker machine installation is straight-forward (just copy the executable)
curl -L https://github.com/docker/machine/releases/download/v0.5.5/docker-machine_darwin-amd64 >/usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine
You might want to upgrade your VirtualBox to the latest version though.

Related

Is possible to uninstall docker desktop on MacOSX and keep docker docker-engine and VMs working?

I'm using docker for a while and when I installed it I didn't note if the command line and the GUI Docker desktop were installed as two separate things. So I want to uninstall only the docker desktop but keep the command line working on MACOSX 11.
Is that possible? How can I do that?

Is docker for windows running linux container in virtualbox?

I installed the latest docker for windows from website.
there is no virtualbox installed. How windows run a linux container in my computer ? Is have a buildin linux kernel in windows?
It uses HyperV in newer releases. VirtualBox was used by docker-machine which is part of docker-toolkit.
Inside of the VM, there is a Linux kernel in a linuxkit based OS that is part of the moby project.
Connecting to the docker socket on Windows is described in this FAQ: https://docs.docker.com/docker-for-windows/faqs/#how-do-i-connect-to-the-remote-docker-engine-api

Use docker client without HyperV

My laptop came with Windows 10 Home, which does not have the HyperV feature. I would like to use docker-machine with the virtualbox driver, which should technically be possible without HyperV. But I can't install Docker in the first place because of missing HyperV. Is there a way around that?
Update I found Docker Toolbox! The documentation states that it is a legacy solution though.
you could install the linux subsystem on your windows machine:
https://learn.microsoft.com/en-us/windows/wsl/install-win10
i think this will allow you to install docker, and as long as you have a bash window open, the docker engine will remain active
EDIT: Docker for Windows is now available (without HyperV), this will run in the background and would probably be better

How does docker run on osx, does it use vagrant?

I use an older model MB Air and running vagrant is very resource intensive for me.
When using docker on OSX, does it just use vagrant behind the scenes to run my docker instance on ubuntu?
In contrast to the deprecated Docker Toolbox (which also runs on MacOS), recent versions of Docker for Mac do not use VirtualBox, but rather HyperKit, a native MacOS hypervisor, which is built on xhyve. In comparison to VirtualBox, HyperKit claims to be more lightweight.
Also consider the official documentation on the differences and interna of Docker Toolbox and Docker for Mac (emphasis mine):
Docker for Mac is a Mac native application, that you install in /Applications. [...]
Here are some key points to know about Docker for Mac before you get started:
Docker for Mac does not use VirtualBox, but rather HyperKit, a lightweight macOS virtualization solution built on top of Hypervisor.framework in macOS 10.10 Yosemite and higher. [...]
The Docker for Mac application does not use docker-machine to provision that VM; but rather creates and manages it directly.
At installation time, Docker for Mac provisions an HyperKit VM based on Alpine Linux, running Docker Engine. It exposes the docker API on a socket in /var/run/docker.sock. Since this is the default location where docker will look if no environment variables are set, you can start using docker and docker-compose without setting any environment variables.
[...]
With Docker for Mac, you get only one VM, and you don’t manage it. It is managed by the Docker for Mac application, which includes autoupdate to update the client and server versions of Docker.
It doesn't use Vagrant, but it there is underlying VirtualBox machine similar to what Vagrant uses. Things might be slightly better with Docker because the docker VM is very slimmed down version. And you can pack multiple images into that VM in more efficient manner, because they will be using the same kernel and IO layers.
Also, note that with both Vagrant and Docker you can use AWS or similar cloud things to actually run your images.

How to initialize and run Docker on windows?

I have Docker installed on Windows 7 platform. However when I try to run boot2docker start, the console gives me:
Failed to get machine 'boot2docker-vm': machine does not exist.
Ok, so I try to initialize the machine: boot2docker init. What now happens is even though I have the ISO image on the same path as docker, it tries to download a new image (and then fails to do so).
I uninstalled both OracleVM and GIT before installing them with boot2docker bundle as advised on Docker forums, but now I don't know how to proceed.
I had the same problem on a Windows 7 64 bit system when I installed the entire boot2docker package. It seems that running the solely 64-bit based boot2docker image from a 32-bit OS image (e.g. created by Virtualbox) does not work.
The solution for me was
to activate Intel Virtualisation Technolologies in my BIOS
(Lenovo X61 for me). Note that the settings can be found either
under CPU or Security.
choose a 64 bit OS version in VirtualBox and boot in with the
image obtained by boot2docker.
In case you're trying to do this now
For Windows 10 64-bit: Pro, Enterprise, or Education (Build 15063 or later), follow the instructions to install Docker Desktop here https://docs.docker.com/docker-for-windows/install/.
If you have Windows systems that do not meet the requirements of Docker Desktop for Windows(in my case Microsoft Windows 10 Home Single Language), you can install Docker Toolbox by following the instructions here https://docs.docker.com/toolbox/toolbox_install_windows/.
boot2docker does not support sharing directories on Windows IIRC. The way I run Docker on windows is:
install VirtualBox
install Vagrant
create a directory (let's say c:\vm\docker)
download this Vagrantfile and save it under c:\vm\docker\Vagrantfile
open a DOS command prompt
go to the directory cd c:\vm\docker
start the VM vagrant up and wait for it to install, start up and get provisionned
connect to the VM vagrant ssh
play with docker docker images, etc
Also you might want a real console instead of using the DOS command prompt:
install Git Bash for Windows
install Console
setup Console to use Git Bash (see this guide)
use Console to run the vagrant up and vagrant ssh commands

Resources