John
John

Reputation: 1220

Virtual Box on Windows while using Docker

The following documentation says:

"Docker is installed and running inside of your local Native Apps Virtual Machine in Virtual Box"

My Questions: Question 1:I am using Windows 7, so is it like when I installed the Docker on my windows machine, there already existed a Virtual Box on my Windows machine and the docker got installed inside of the "Local Native Apps Virtual MAchine" which is inside the Virtual Box?

When I installed the docker, the following Oracle VM VirtualBox Manager was also installed:

enter image description here

Question 2:Basically, I want to work on Linux environment inside the docker, so basically I can pull ubuntu 14.10 image repository and work, right? Is it like I can pull another repository over the ubuntu 14.10 and work on it using Linux commands?

Upvotes: 0

Views: 1557

Answers (1)

Hy L
Hy L

Reputation: 582

Q1: Yes. The Docker Engine uses Linux-specific kernel features, so to run it on Windows we need to use a lightweight virtual machine (vm). Boot2Docker is a lightweight Linux distribution made specifically to run Docker containers.

Q2: Yes to the first question mark. No to the second question mark. After installing docker, you can launch a container with a base Ubuntu image.

$ sudo docker run -i -t ubuntu /bin/bash

here /bin/bash, is to start the Bash shell inside the new container Now you are already in a linux environment, and you can start your work here. You don't need to pull another repository. You can create many containers based on the ubuntu image you are having. If you want to save your work to an image, you could do a commit: https://docs.docker.com/userguide/dockerimages/#updating-and-committing-an-image

You can either save or export the image to local for future use.

  • Export is used to persist a container (not an image).

  • Save is used to persist an image (not a container).

    The exported version is slightly smaller. That is because it is flattened, which means it lost its history and meta-data.

Something good to know: A Docker image is a read-only template. For example, an image could contain an Ubuntu operating system with Apache and your web application installed.Images are used to create Docker containers. Docker containers are similar to a directory. A Docker container holds everything that is needed for an application to run.

Upvotes: 1

Related Questions