Docker
Last updated
Last updated
helps developers build, share, run, and verify applications anywhere with containers. More info on containers .
A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.
This can be used on other operating systems and services such as , , , and so many more here on .
You can find Docker images on their Hub that you can pull and use.
The main difference between Docker and VMs is their architecture.
VMs have the host OS and guest OS inside each VM. A guest OS can be any OS, like Linux or Windows. They are stand-alone with their kernel and security features. Therefore, applications needing more privileges and security run on virtual machines. They are more resource-intensive than Docker containers as the virtual machines need to load the entire OS to start.
Docker containers host on a single physical computer with a host OS, which shares among them. Sharing the host OS between containers makes them light and increases the boot time. Docker containers typically are run with root(admin) privileges. The container technology has access to the kernel subsystems; as a result, a single infected application is capable of hacking the entire host system. The lightweight architecture of Docker containers is less resource-intensive than virtual machines.
If your system only supports one of the two options, you will not be able to select which backend to use.
Double-click Docker.dmg to open the installer, then drag the Docker icon to the Applications folder.
Double-click Docker.app in the Applications folder to start Docker.
Pull an image or a repository from a registry
List pulled images
Run a docker image with the given name (--name) from the chosen image
Start a container to have it run in the background
Stop a running container
Show running containers
Shows what containers are taking up what resources
Shows all docker images
Removes a container
Removes an Image
and run it with
Verify it's running with
We can now interact with it by running
More info for linux installation can be found .
Download docker for Windows and run the installer. When prompted, ensure the Use WSL 2 instead of Hyper-V option on the Configuration page is selected or not depending on your choice of backend.
More info for Windows installation can be found .
Download the appropriate the .dmg for the or .
More info for MacOS installation can be found .
Docker commands can be found .
Share your images to the registry or to a self-hosted one.
Some images may have various versions, we can select which version we want to pull and load. Eg. Ubuntu versions can be found on the Docker hub and we can pull a specified Ubuntu image version with