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

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
主站蜘蛛池模板: 铁岭市| 岑巩县| 郴州市| 宁陕县| 连平县| 新邵县| 敦化市| 池州市| 平南县| 宁化县| 辽阳县| 吐鲁番市| 怀安县| 六枝特区| 竹山县| 台东县| 武城县| 临清市| 子洲县| 沂水县| 偏关县| 平乐县| 赤峰市| 深泽县| 新乡市| 岚皋县| 辽中县| 梓潼县| 林西县| 新巴尔虎左旗| 南木林县| 太谷县| 杭锦旗| 九江市| 东方市| 靖宇县| 石景山区| 岳普湖县| 保定市| 清水河县| 龙陵县|