官术网_书友最值得收藏!

Installing Docker with script

Update your DNF package, as follows:

$ sudo dnf update

Running the Docker installation script

The Docker installation can also be done in a quick and easy way by executing the shell script and getting it from the official Docker website:

$ curl -fsSL https://get.docker.com/ | sh
+ sh -c 'sleep 3; dnf -y -q install docker-engine'

Start the Docker daemon:

$ sudo systemctl start docker

Docker run hello-world:

$ sudo docker run hello-world

To create a Docker group and add a user, follow the steps mentioned, as follows:

$ sudo groupadd docker 
$ sudo usermod -aG docker your_username

Log out and log in with the user to make sure that your user is created successfully:

$ docker run hello-world

In order to uninstall Docker, follow these steps:

# sudo dnf -y remove docker-engine.x86_64

The truncated output of the preceding command is listed as follows:

Dependencies resolved. Transaction Summary ================================================================ Remove 7 Packages Installed size: 57 M Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction ... Complete! [root@osboxes ~]# rm -rf /var/lib/docker
主站蜘蛛池模板: 礼泉县| 朔州市| 鲁甸县| 古蔺县| 垣曲县| 台前县| 巴楚县| 鹤山市| 叶城县| 神池县| 七台河市| 化州市| 汕尾市| 永清县| 建昌县| 崇明县| 龙南县| 冕宁县| 乌恰县| 富川| 时尚| 阿拉善盟| 青阳县| 怀仁县| 绍兴县| 昆山市| 勃利县| 武威市| 礼泉县| 沈丘县| 兴山县| 嘉荫县| 鄂伦春自治旗| 汶川县| 天台县| 盐源县| 呼和浩特市| 彰化县| 祥云县| 高平市| 蚌埠市|