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

Installing Docker on Fedora

Docker is supported on Fedora version 22 and 23. The following are the steps to be performed in order to install Docker on Fedora 23. It can be deployed on bare-metal or as a VM.

Checking Linux kernel Version

Docker requires 64-bit installation, regardless of the Fedora version. Also, the kernel version should be at least 3.10. Check the kernel version before going ahead with installation using the following command:

$ uname -r
4.4.7-300.fc23.x86_64
Switch to root user
[os@osboxes ~]# su -
Password:
[root@vkohli ~]#

Installing with DNF

Update the existing DNF package by using the following command:

$ sudo dnf update 

Adding to the YUM repository

Let's add the Docker repository to the YUM repository:

$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF' > [dockerrepo] > name=Docker Repository > baseurl=https://yum.dockerproject.org/repo/main/fedora/$releasever/ > enabled=1 > gpgcheck=1 > gpgkey=https://yum.dockerproject.org/gpg > EOF [dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/fedora/$releasever/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg

Installing the Docker package

The Docker Engine can be installed using the DNF package:

$ sudo dnf install docker-engine

The output will be similar to the following listing (this listing is truncated):

Docker Repository 32 kB/s | 7.8 kB 00:00 Last metadata expiration check: 0:00:01 ago on Thu Apr 21 15:45:25 2016. Dependencies resolved. Install 7 Packages ... Running transaction test Transaction test succeeded. Running transaction Installing: python-IPy-0.81-13.fc23.noarch .... Installed: ... Complete!

Start the Docker service using systemctl:

$ sudo systemctl start docker 

Verify with a Docker hello-world example in order to check whether Docker is installed successfully:

[root@osboxes ~]# docker run hello-world 

The output will be similar to the following listing:

Unable to find image 'hello-world:last' locally latest: Pulling from library/hello-world 03f4658f8b78: Pull complete a3ed95caeb02: Pull complete Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7 Status: Downloaded newer image for hello-world:latest Hello from Docker. This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:

  1. The Docker client contacted the Docker daemon.
  2. The Docker daemon pulled the hello-world image from the Docker Hub.
  3. The Docker daemon created a new container from that image, which runs the executable that produces the output you are currently reading.
  4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.

To try something more ambitious, you can run an Ubuntu container with the following command:

$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker Hub account, https://hub.docker.com.

For more examples and ideas, visit https://docs.docker.com/userguide/md64-server-20160114.5 (ami-a21529cc).

主站蜘蛛池模板: 麦盖提县| 蓝山县| 民勤县| 乐业县| 沾益县| 乌苏市| 宁南县| 泸溪县| 林州市| 江达县| 双桥区| 海原县| 鄂温| 淳化县| 平邑县| 疏附县| 通海县| 五华县| 和静县| 乌什县| 游戏| 随州市| 金沙县| 白沙| 长丰县| 鹰潭市| 周宁县| 安图县| 苏尼特左旗| 昌吉市| 新蔡县| 邓州市| 诸暨市| 文化| 榆中县| 汉寿县| 二连浩特市| 色达县| 吉林省| 枣强县| 保康县|