Docker Installation: Difference between revisions
DrEdWilliams (talk | contribs) mNo edit summary |
DrEdWilliams (talk | contribs) mNo edit summary Tag: visualeditor |
||
| (8 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | |||
= Docker Community Edition install = | |||
This installs the official Docker distrubution from the '''community edition''' repository. | This installs the official Docker distrubution from the '''community edition''' repository. | ||
== Fedora == | == Fedora == | ||
The docker team officially supports Fedora, but the rapid pace of Fedora releases (every 6 months) and the changing cgroups support (fedora has moved to v2 but docker is still on v1) has led to delays with the Fedora 33 release of docker-ce. I expect this will happen again for future releases, so the instructions below accommodate this possibility. | The docker team officially supports Fedora, but the rapid pace of Fedora releases (every 6 months) and the changing cgroups support (fedora has moved to v2 but docker is still on v1) has led to delays with the Fedora 33 release of docker-ce. I expect this will happen again for future releases, so the instructions below accommodate this possibility. | ||
| Line 23: | Line 24: | ||
=== Prerequisites === | === Prerequisites === | ||
* [[Basic CentOS 7 | * [[Basic CentOS 7 Installation]] | ||
* [[CUDA + NVIDIA drivers]] (if GPU is present) | * [[CUDA + NVIDIA drivers]] (if GPU is present) | ||
| Line 29: | Line 30: | ||
sudo yum install -y yum-utils device-mapper-persistent-data lvm2 | sudo yum install -y yum-utils device-mapper-persistent-data lvm2 | ||
sudo yum-config-manager --add-repo <nowiki>https://download.docker.com/linux/centos/docker-ce.repo</nowiki> | sudo yum-config-manager --add-repo <nowiki>https://download.docker.com/linux/centos/docker-ce.repo</nowiki> | ||
=== Install Docker === | === Install Docker === | ||
| Line 41: | Line 38: | ||
=== Prerequisites === | === Prerequisites === | ||
* [[Basic Debian | * [[Basic Debian Installation]] | ||
=== Set up Docker-CE Repository === | === Set up Docker-CE Repository === | ||
| Line 51: | Line 48: | ||
=== Install Docker === | === Install Docker === | ||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | sudo apt-get install -y docker-ce docker-ce-cli containerd.io | ||
== Finishing the Install == | == Finishing the Install == | ||
| Line 88: | Line 68: | ||
scp -r aslan:.docker ~ | scp -r aslan:.docker ~ | ||
= GPU Nodes = | |||
On GPU-enabled nodes, install the | On GPU-enabled nodes, install the [[NVIDIA Docker Runtime]]. | ||
Latest revision as of 12:24, 17 October 2021
Docker Community Edition install[edit]
This installs the official Docker distrubution from the community edition repository.
Fedora[edit]
The docker team officially supports Fedora, but the rapid pace of Fedora releases (every 6 months) and the changing cgroups support (fedora has moved to v2 but docker is still on v1) has led to delays with the Fedora 33 release of docker-ce. I expect this will happen again for future releases, so the instructions below accommodate this possibility.
Prerequisites[edit]
- Basic Fedora 31+ Installation
- CUDA + NVIDIA drivers (if GPU is present)
Set up Docker-CE Repository[edit]
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo dnf list docker\*
If you don't see the docker-ce* packages in the listing, you need to enable the test repository (CAUTION):
sudo dnf config-manager --set-enabled docker-ce-test
Then you install the packages
sudo dnf install docker-ce docker-ce-cli containerd.io
CentOS[edit]
( originally from https://docs.docker.com/engine/installation/linux/centos/ )
Prerequisites[edit]
- Basic CentOS 7 Installation
- CUDA + NVIDIA drivers (if GPU is present)
Set up Docker-CE Repository[edit]
sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Install Docker[edit]
sudo yum install -y docker-ce docker-ce-cli containerd.io
Debian[edit]
( originally from https://docs.docker.com/engine/installation/linux/debian/ )
Prerequisites[edit]
Set up Docker-CE Repository[edit]
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" sudo apt-get update
Install Docker[edit]
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
Finishing the Install[edit]
Make sure the docker daemon is running and set up to start automatically (should already be done by the package install):
sudo systemctl enable --now docker
Test installation
sudo docker run --rm hello-world sudo docker image rm -f hello-world
Enable standard user access to docker commands (requires $USER to log out and back in to activate)
sudo groupadd docker sudo usermod -aG docker $USER
In order to access the local repositories, we need to copy the certs into the local docker config
sudo scp -r aslan:/etc/docker/certs.d /etc/docker
Copy over the .docker directory from aslan for both root and user(s) to get login credentials
sudo scp -r aslan:.docker /root scp -r aslan:.docker ~
GPU Nodes[edit]
On GPU-enabled nodes, install the NVIDIA Docker Runtime.