⚠ WARNING: be careful and follow the procedure. Each step is important.
- Run the following command
snap install docker
sudo chmod 666 /var/run/docker.sock
👉 The following procedure is taken from this page.
- Install docker (run the following commands):
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install -yqq apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
- Setup your user to be able to run docker without
sudo
:
sudo usermod -aG docker your-user
- Install docker-compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- Restart your computer
Follow the procedure on this page
Follow the procedure on this page
To use docker on Windows Home, you need to use the Docker Toolbox, which use VirtualBox to run docker on your machine.
The Docker Toolbox and the VirtualBox env will change two important things when you use docker :
- The host to access the containers isn't
localhost
, but the IP192.168.99.100
(by default) - Due to the nature of VirtualBox, the volumes binding between your local system and the containers are kinda limited. Please ensure that your working folder is inside the
C:/Users
path.
Simply run the following command (without sudo
): docker run hello-world
. The following response should appear after some time:
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/