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

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
主站蜘蛛池模板: 四子王旗| 东平县| 额尔古纳市| 安达市| 郧西县| 工布江达县| 土默特左旗| 大冶市| 宁海县| 凤山县| 天台县| 尼勒克县| 清河县| 望江县| 山阳县| 游戏| 子洲县| 花莲市| 黔西县| 建阳市| 洛隆县| 驻马店市| 德庆县| 南通市| 平南县| 石楼县| 仪征市| 兴安县| 海淀区| 宁晋县| 射阳县| 柘荣县| 鄂托克前旗| 和龙市| 务川| 鹤山市| 虎林市| 原平市| 印江| 台州市| 宽甸|