Install Docker CE at CentOS 7

Before you install Docker Engine - Community for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.

SET UP THE REPOSITORY

  1. Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-dataand lvm2 are required by the devicemapper storage driver.
    $ sudo yum install -y yum-utils \
    device-mapper-persistent-data \
    lvm2
  2. Use the following command to set up the stable repository.
    $ sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

 

INSTALL DOCKER ENGINE - COMMUNITY

1. Install the latest version of Docker Engine - Community and containerd, or go to the next step to install a specific version:

$ sudo yum install docker-ce docker-ce-cli containerd.io

2. Start Docker.

$ sudo systemctl start docker
$ sudo systemctl enable docker

3. Verify that Docker Engine - Community is installed correctly by running the hello-world image.

$ sudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.

 

Была ли эта статья полезной?
Пользователи, считающие этот материал полезным: 0 из 0
Еще есть вопросы? Отправить запрос

0 Комментарии

Войдите в службу, чтобы оставить комментарий.
На базе технологии Zendesk