Prerequisite
$ cat /etc/os-release
...
VERSION="43 (Workstation Edition)"
...
Install Docker CE (Community Edition)
https://docs.docker.com/engine/install/fedora/
Remove possible old version of Docker CE
$ sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
Install Docker CE RPM repo
$ sudo dnf config-manager addrepo --from-repofile https://download.docker.com/linux/fedora/docker-ce.repo
Install Docker CE
$ sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Start and auto start Docker CE
$ sudo systemctl enable --now docker
Test
$ sudo docker run hello-world
...
Hello from Docker!
This message shows that your installation appears to be working correctly.
...
Run the Docker Daemon as a Non-Root User (Rootless Mode).
https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
"Log out and log back in so that your group membership is re-evaluated."
"You can also run the following command to activate the changes to groups:"
$ newgrp docker
Verify
$ docker run hello-world
...
Hello from Docker!
This message shows that your installation appears to be working correctly.
...
No comments:
Post a Comment