docker:install_docker
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
docker:install_docker [2016/10/14 00:03] – peter | docker:install_docker [2021/02/05 11:32] (current) – peter | ||
---|---|---|---|
Line 11: | Line 11: | ||
Check that it's a 64Bit Kernel (x86_64). | Check that it's a 64Bit Kernel (x86_64). | ||
+ | ---- | ||
Check the Ubuntu version. | Check the Ubuntu version. | ||
Line 19: | Line 20: | ||
The command shows that the Ubuntu version is 16.04. | The command shows that the Ubuntu version is 16.04. | ||
+ | |||
+ | ---- | ||
It is recommended to update Ubuntu before you install new software. Run the following command to fetch the latest updates from the Ubuntu repository and install them. | It is recommended to update Ubuntu before you install new software. Run the following command to fetch the latest updates from the Ubuntu repository and install them. | ||
- | apt-get update | + | <code bash> |
- | apt-get | + | sudo apt update |
+ | sudo upgrade | ||
+ | </ | ||
+ | |||
+ | ---- | ||
Now install docker with the apt command: | Now install docker with the apt command: | ||
<code bash> | <code bash> | ||
- | apt-get install -y docker.io | + | sudo apt install -y docker.io |
</ | </ | ||
- | Wait until the installation has been completed, then you can start Docker with the systemctl command: | + | Wait until the installation has been completed. |
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Add your user to the docker group ===== | ||
+ | |||
+ | <code bash> | ||
+ | sudo usermod -aG docker $USER | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | Log out and log back in. | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Verify that you can run docker commands without sudo ===== | ||
+ | |||
+ | <code bash> | ||
+ | docker run hello-world | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | <code bash> | ||
+ | sudo chmod 666 / | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | Then you can start Docker with the systemctl command: | ||
<code bash> | <code bash> | ||
systemctl start docker | systemctl start docker | ||
</ | </ | ||
+ | |||
+ | ---- | ||
Enable docker to run at system boot: | Enable docker to run at system boot: | ||
Line 42: | Line 87: | ||
systemctl enable docker | systemctl enable docker | ||
</ | </ | ||
+ | |||
+ | ---- | ||
You might also want to check the docker version: | You might also want to check the docker version: | ||
Line 51: | Line 98: | ||
Show the currently installed Docker version. | Show the currently installed Docker version. | ||
- | Now docker is installed in your system. | + | Now docker is installed in your system. |
+ | |||
+ | You can start making a container by downloading a Docker Image from the Docker Registry. | ||
docker/install_docker.1476403411.txt.gz · Last modified: 2020/07/15 09:30 (external edit)