docker:install_docker_-_old
Differences
This shows you the differences between two versions of the page.
docker:install_docker_-_old [2025/06/05 20:53] – created peter | docker:install_docker_-_old [2025/06/05 20:54] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Docker - Install Docker - old ====== | ====== Docker - Install Docker - old ====== | ||
+ | |||
+ | ===== Check the kernel version and the OS architecture ===== | ||
+ | |||
+ | Run **uname -a** to check the version of the currently running Linux kernel: | ||
+ | |||
+ | <code bash> | ||
+ | uname -a | ||
+ | </ | ||
+ | |||
+ | Check that it's a 64Bit Kernel (x86_64). | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Check the Ubuntu version. | ||
+ | |||
+ | <code bash> | ||
+ | cat / | ||
+ | </ | ||
+ | |||
+ | 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. | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt update | ||
+ | sudo upgrade | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Now install docker with the apt command: | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt install -y docker.io | ||
+ | </ | ||
+ | |||
+ | Wait until the installation has been completed. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Add your user to the docker group ===== | ||
+ | |||
+ | <code bash> | ||
+ | sudo usermod -aG docker $USER | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | To enable this functionality, | ||
+ | newgrp docker | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Verify that you can run docker commands without sudo ===== | ||
+ | |||
+ | <code bash> | ||
+ | docker run hello-world | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | <code bash> | ||
+ | sudo chmod 666 / | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Start Docker ===== | ||
+ | |||
+ | <code bash> | ||
+ | systemctl start docker | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Enable docker to run at system boot ===== | ||
+ | |||
+ | <code bash> | ||
+ | systemctl enable docker | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Check the docker version ===== | ||
+ | |||
+ | <code bash> | ||
+ | docker version | ||
+ | </ | ||
+ | |||
+ | Show the currently installed Docker version. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * A container can now be started by downloading a Docker Image from the Docker Registry. | ||
+ | |||
+ | </ | ||
+ | |||
docker/install_docker_-_old.txt · Last modified: 2025/06/05 20:54 by peter