Source: https://docs.docker.com/engine/install/ubuntu/
Section: Install using the convenience script
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
<output truncated>
If you would like to use Docker as a non-root user, you should now consider adding your user to the “docker” group with something like:
sudo usermod -aG docker your-user
Remember to log out and back in for this to take effect!
The Docker service needs to be setup to run at startup. To do so, type in each command followed by enter:
sudo systemctl start docker
sudo systemctl enable docker
Log out
$ logout
Then run docker example
docker run -it ubuntu bash
OR
docker run hello-world
No comments:
Post a Comment