Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 installs Docker and private server

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

First, install docker

Install docker on centos7. The official website has more detailed instructions:

Https://docs.docker.com/install/linux/docker-ce/centos/

The installation method I chose is Install from a package on the official website.

1. Docker requires that the kernel version of the CentOS system is higher than 3.10. Check the operating system version.

Uname-r

2. Download the rpm package of docker

Https://download.docker.com/linux/centos/7/x86_64/stable/Packages/

Download the docker-ce-18.06.1.ce-3.el7.x86_64.rpm version

3. Delete the old version docker

Yum remove docker\ docker-client\ docker-client-latest\ docker-common\ docker-latest\ docker-latest-logrotate\ docker-logrotate\ docker-selinux\ docker-engine-selinux\ docker-engine

4. Add yum source

Sudo yum-config-manager\-- add-repo\ https://download.docker.com/linux/centos/docker-ce.repo

5. Installation

Yum install / opt/docker-ce-18.06.1.ce-3.el7.x86_64.rpm

6. Start the docker service and join boot startup

Systemctl start dockersystemctl enable docker

7. Check whether the installation is successful

Docker version

2. Start the docker private warehouse

1. Download registry

Docker pull registry

2. Start registry

Docker run-d-ti-- restart always-- name docker-registry-p 5000V / data/docker/registry:/var/lib/registry registry

3. Configure the address of private warehouse (all docker servers that need to be connected)

Vim / etc/docker/daemon.json

{"insecure-registries": ["xxx.xxx.xxx.xxx:5000"]}

4. Enable remote call (here is to generate docker image later using maven plug-in)

Vim / usr/lib/systemd/system/docker.service

ExecStart=/usr/bin/dockerd-H tcp://0.0.0.0:2375-H unix://var/run/docker.sock

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report