Centos 7 Docker configuration secure remote API

Source: Internet
Author: User

Log view:

sudo journalctl-fu docker.service

Certificate Generation Reference:

https://docs.docker.com/engine/security/https/

Vi/lib/systemd/system/docker.service:

[Unit]
Description=docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target Docker.socket
Requires=docker.socket

[Service]
type=notify
# The default is ' not ' systemd for cgroups because the delegate issues still
# Exis TS and SYSTEMD currently does not support the Cgroup feature set required
# for containers run by docker
#ExecStart = /usr/bin/docker Daemon--registry-mirror=http://3cda3ca9.m.daocloud.io-h fd://
#ExecStart =/usr/bin/docker Daemon--registry-mirror=http://3cda3ca9.m.daocloud.io--insecure-registry 42.62.101.83:5000-h fd://
# $OPTIONS $ Docker_storage_options
#ExecStart =/usr/bin/docker daemon--registry-mirror=http://3cda3ca9.m.daocloud.io-h FD :/h tcp://0.0.0.0:2375
Execstart=/usr/bin/docker daemon--tlsverify--tlscacert=/root/openssl/ca.pem--tlscert =/root/openssl/server-cert.pem--tlskey=/root/openssl/server-key.pem--registry-mirror=http:// 3cda3ca9.m.daocloud.io-h tcp://0.0.0.0:2376

Mountflags=slave
limitnofile=1048576
limitnproc=1048576
Limitcore=infinity
Timeoutstartsec=0
# Set delegate yes so, SYSTEMD does not reset the cgroups of Docker containers
Delegate=yes

[Install]
Wantedby=multi-user.target

To restart Docker by running the command:

Systemctl Daemon-reload

Service Docker restart

Centos 7 Docker configuration secure remote API

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.