其他分享
首页 > 其他分享> > docker使用阿里云镜像仓库

docker使用阿里云镜像仓库

作者:互联网

一、阿里云docker仓库

1:阿里云docker仓库 https://dev.aliyun.com/search.html

2:进去注册帐号后,点击自己的管理中心。

3:在管理中心点击加速器,右边面板会有你的加速地址,右边面板下面有详细设置步骤。 

4、配置docker镜像加速器:

[root@docker ~]# cat /usr/lib/systemd/system/docker.service [Unit] Description=Docker Application Container Engine Documentation=http://docs.docker.com After=network.target rhel-push-plugin.socket registries.service Wants=docker-storage-setup.service Requires=docker-cleanup.timer   [Service] Type=notify NotifyAccess=all EnvironmentFile=-/run/containers/registries.conf EnvironmentFile=-/etc/sysconfig/docker EnvironmentFile=-/etc/sysconfig/docker-storage EnvironmentFile=-/etc/sysconfig/docker-network Environment=GOTRACEBACK=crash Environment=DOCKER_HTTP_HOST_COMPAT=1 Environment=PATH=/usr/libexec/docker:/usr/bin:/usr/sbin ExecStart=/usr/bin/dockerd-current --registry-mirror=https://alzgoonw.mirror.aliyuncs.com \           --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \           --default-runtime=docker-runc \           --exec-opt native.cgroupdriver=systemd \           --userland-proxy-path=/usr/libexec/docker/docker-proxy-current \           --init-path=/usr/libexec/docker/docker-init-current \           --seccomp-profile=/etc/docker/seccomp.json \           $OPTIONS \           $DOCKER_STORAGE_OPTIONS \           $DOCKER_NETWORK_OPTIONS \           $ADD_REGISTRY \           $BLOCK_REGISTRY \           $INSECURE_REGISTRY \       $REGISTRIES ExecReload=/bin/kill -s HUP $MAINPID LimitNOFILE=1048576 LimitNPROC=1048576 LimitCORE=infinity TimeoutStartSec=0 Restart=on-abnormal KillMode=process   [Install] WantedBy=multi-user.target

  

[root@docker ~]# cat /usr/lib/systemd/system/docker.service[Unit]Description=Docker Application Container EngineDocumentation=http://docs.docker.comAfter=network.target rhel-push-plugin.socket registries.serviceWants=docker-storage-setup.serviceRequires=docker-cleanup.timer
[Service]Type=notifyNotifyAccess=allEnvironmentFile=-/run/containers/registries.confEnvironmentFile=-/etc/sysconfig/dockerEnvironmentFile=-/etc/sysconfig/docker-storageEnvironmentFile=-/etc/sysconfig/docker-networkEnvironment=GOTRACEBACK=crashEnvironment=DOCKER_HTTP_HOST_COMPAT=1Environment=PATH=/usr/libexec/docker:/usr/bin:/usr/sbinExecStart=/usr/bin/dockerd-current --registry-mirror=https://alzgoonw.mirror.aliyuncs.com \          --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \          --default-runtime=docker-runc \          --exec-opt native.cgroupdriver=systemd \          --userland-proxy-path=/usr/libexec/docker/docker-proxy-current \          --init-path=/usr/libexec/docker/docker-init-current \          --seccomp-profile=/etc/docker/seccomp.json \          $OPTIONS \          $DOCKER_STORAGE_OPTIONS \          $DOCKER_NETWORK_OPTIONS \          $ADD_REGISTRY \          $BLOCK_REGISTRY \          $INSECURE_REGISTRY \  $REGISTRIESExecReload=/bin/kill -s HUP $MAINPIDLimitNOFILE=1048576LimitNPROC=1048576LimitCORE=infinityTimeoutStartSec=0Restart=on-abnormalKillMode=process
[Install]WantedBy=multi-user.target

标签:libexec,current,etc,阿里,usr,sysconfig,镜像,docker
来源: https://www.cnblogs.com/skgoo/p/10811673.html