一、启动状态才能Docker Images
二、设置镜像加速器
三、开始下载镜像
三、下载镜像Nginx Tomcat Mysql
附件:镜像加速器设置方法
[root@bogon ~]# cat /etc/docker/daemon.json
{"registry-mirrors": ["https://hccwwfjl.mirror.aliyuncs.com"]}
[root@bogon ~]# systemctl daemon-reload
[root@bogon ~]# systemctl restart docker
[root@bogon ~]# docker images
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@bogon ~]# systemctrl start docker
-bash: systemctrl: command not found
[root@bogon ~]# system
systemctl systemd-coredumpctl systemd-inhibit systemd-run
systemd-analyze systemd-delta systemd-loginctl systemd-stdio-bridge
systemd-ask-password systemd-detect-virt systemd-machine-id-setup systemd-sysv-convert
systemd-cat systemd-escape systemd-notify systemd-tmpfiles
systemd-cgls systemd-firstboot systemd-nspawn systemd-tty-ask-password-agent
systemd-cgtop systemd-hwdb systemd-path
[root@bogon ~]# systemctl start docker
[root@bogon ~]# docker status
docker: 'status' is not a docker command.
See 'docker --help'
[root@bogon ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
[root@bogon ~]# docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.13.1
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: docker-runc runc
Default Runtime: docker-runc
Init Binary: /usr/libexec/docker/docker-init-current
containerd version: (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: 5eda6f6fd0c2884c2c8e78a6e7119e8d0ecedb77 (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: fec3683b971d9c3ef73f284f176672c44b448662 (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
seccomp
WARNING: You're not using the default seccomp profile
Profile: /etc/docker/seccomp.json
selinux
Kernel Version: 3.10.0-862.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 1
Total Memory: 488 MiB
Name: bogon
ID: LRX6:LXIG:FCIK:FVDQ:PDXC:5DGP:HTUI:XC7M:CENZ:2QZF:LKD3:PBSL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Registries: docker.io (secure)
[root@bogon ~]# docker pull tomcat:8.5.16
Trying to pull repository docker.io/library/tomcat ...
8.5.16: Pulling from docker.io/library/tomcat
06b22ddb1913: Pulling fs layer
336c28b408ed: Pulling fs layer
1f3e6b8d80c3: Pulling fs layer
aeac59510475: Waiting
b01db8bd8540: Waiting
f7f398af5fea: Waiting
1c5595fa1317: Waiting
e1a6cc83dc3d: Waiting
9efe1c932022: Waiting
eef936b7f842: Waiting
3c1e71063aec: Waiting
e4baeac59d4b: Waiting
52da60bb1e3e: Waiting
error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/b2/b226d7ee3462843cc6a38d62cec7a6634b452fbee580c180776e7dc8860244ab/data?verify=1535811566-1pWAiMIFGKf%2FaAdaNMJahfmgAF8%3D: net/http: TLS handshake timeout
[root@bogon ~]# docker pull tomcat:8.5.16
Trying to pull repository docker.io/library/tomcat ...
8.5.16: Pulling from docker.io/library/tomcat
06b22ddb1913: Downloading
336c28b408ed: Downloading
1f3e6b8d80c3: Waiting
aeac59510475: Waiting
b01db8bd8540: Waiting
f7f398af5fea: Pulling fs layer
1c5595fa1317: Pulling fs layer
e1a6cc83dc3d: Pulling fs layer
9efe1c932022: Pulling fs layer
eef936b7f842: Pulling fs layer
3c1e71063aec: Pulling fs layer
e4baeac59d4b: Pulling fs layer
52da60bb1e3e: Pulling fs layer
error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/b2/b226d7ee3462843cc6a38d62cec7a6634b452fbee580c180776e7dc8860244ab/data?verify=1535811630-n0P6p%2FFQhg9vDDVqMOvrr%2FVfFck%3D: net/http: TLS handshake timeout
[root@bogon ~]# systemctl restart docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@bogon ~]# ps -ef |grep docker
root 1747 1480 0 09:40 pts/0 00:00:00 grep --color=auto docker
[root@bogon ~]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@bogon ~]# docker info
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@bogon ~]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@bogon ~]# reboot
Connection timed out
Last login: Sat Sep 1 09:42:42 2018
[root@bogon ~]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@bogon ~]# systemctl start docker
[root@bogon ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
[root@bogon ~]# docker pull tomcat:8.5.16
Trying to pull repository docker.io/library/tomcat ...
8.5.16: Pulling from docker.io/library/tomcat
06b22ddb1913: Pull complete
336c28b408ed: Pull complete
1f3e6b8d80c3: Pull complete
aeac59510475: Pull complete
b01db8bd8540: Pull complete
f7f398af5fea: Pull complete
1c5595fa1317: Pull complete
e1a6cc83dc3d: Pull complete
9efe1c932022: Pull complete
eef936b7f842: Pull complete
3c1e71063aec: Pull complete
e4baeac59d4b: Pull complete
52da60bb1e3e: Pull complete
Digest: sha256:b3ba28259a92964d8026cf28bea8b9117732cdd6597e2598939c5dee4fd60efa
Status: Downloaded newer image for docker.io/tomcat:8.5.16
[root@bogon ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/tomcat 8.5.16 b226d7ee3462 13 months ago 292 MB
[root@bogon ~]# docker search nginx
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/nginx Official build of Nginx. 9463 [OK]
docker.io docker.io/jwilder/nginx-proxy Automated Nginx reverse proxy for docker c... 1394 [OK]
docker.io docker.io/richarvey/nginx-php-fpm Container running Nginx + PHP-FPM capable ... 610 [OK]
docker.io docker.io/jrcs/letsencrypt-nginx-proxy-companion LetsEncrypt container to use with nginx as... 398 [OK]
docker.io docker.io/kong Open-source Microservice & API Management ... 222 [OK]
docker.io docker.io/webdevops/php-nginx Nginx with PHP-FPM 113 [OK]
docker.io docker.io/kitematic/hello-world-nginx A light-weight nginx container that demons... 108
docker.io docker.io/zabbix/zabbix-web-nginx-mysql Zabbix frontend based on Nginx web-server ... 64 [OK]
docker.io docker.io/bitnami/nginx Bitnami nginx Docker Image 58 [OK]
docker.io docker.io/1and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5 ubuntu-16-nginx-php-phpmyadmin-mysql-5 43 [OK]
docker.io docker.io/linuxserver/nginx An Nginx container, brought to you by Linu... 38
docker.io docker.io/tobi312/rpi-nginx NGINX on Raspberry Pi / armhf 20 [OK]
docker.io docker.io/blacklabelops/nginx Dockerized Nginx Reverse Proxy Server. 12 [OK]
docker.io docker.io/nginxdemos/nginx-ingress NGINX Ingress Controller for Kubernetes . ... 11
docker.io docker.io/wodby/drupal-nginx Nginx for Drupal container image 10 [OK]
docker.io docker.io/nginxdemos/hello NGINX webserver that serves a simple page ... 8 [OK]
docker.io docker.io/webdevops/nginx Nginx container 8 [OK]
docker.io docker.io/centos/nginx-18-centos7 Platform for running nginx 1.8 or building... 7
docker.io docker.io/centos/nginx-112-centos7 Platform for running nginx 1.12 or buildin... 5
docker.io docker.io/1science/nginx Nginx Docker images that include Consul Te... 4 [OK]
docker.io docker.io/pebbletech/nginx-proxy nginx-proxy sets up a container running ng... 2 [OK]
docker.io docker.io/mailu/nginx Mailu nginx frontend 1 [OK]
docker.io docker.io/toccoag/openshift-nginx Nginx reverse proxy for Nice running on sa... 1 [OK]
docker.io docker.io/travix/nginx NGinx reverse proxy 1 [OK]
docker.io docker.io/ansibleplaybookbundle/nginx-apb An APB to deploy NGINX 0 [OK]
[root@bogon ~]# docker pull nginx
Using default tag: latest
Trying to pull repository docker.io/library/nginx ...
latest: Pulling from docker.io/library/nginx
be8881be8156: Pull complete
65206e5c5e2d: Pull complete
8e029c3e2376: Pull complete
Digest: sha256:1b109555ad28bb5ec429422ee136c5f5ab5ee6faaeb518836a5c9a3b6436a1bd
Status: Downloaded newer image for docker.io/nginx:latest
[root@bogon ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/nginx latest 71c43202b8ac 2 days ago 109 MB
docker.io/tomcat 8.5.16 b226d7ee3462 13 months ago 292 MB
[root@bogon ~]# docker pull mysql
Using default tag: latest
Trying to pull repository docker.io/library/mysql ...
latest: Pulling from docker.io/library/mysql
be8881be8156: Already exists
c3995dabd1d7: Pull complete
9931fdda3586: Pull complete
bb1b6b6eff6a: Pull complete
a65f125fa718: Pull complete
2d9f8dd09be2: Pull complete
37b912cb2afe: Pull complete
54242fcd8eaa: Pull complete
0a9d4d211511: Pull complete
270ae5bd02c2: Pull complete
9b55b8e72e70: Pull complete
68083f7985cd: Pull complete
Digest: sha256:d39a8ab7679df309e7eff6ddba434ad5747cc2a2acee2d7c60d8221c9acedcad
Status: Downloaded newer image for docker.io/mysql:latest
[root@bogon ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/nginx latest 71c43202b8ac 2 days ago 109 MB
docker.io/mysql latest 29e0ae3b69b9 2 weeks ago 484 MB
docker.io/tomcat 8.5.16 b226d7ee3462 13 months ago 292 MB
[root@bogon ~]#
设置镜像加速器
Last login: Sat Sep 1 09:22:59 2018 from 192.168.1.102
[root@bogon ~]# cat /etc/docker/
certs.d/ daemon.json key.json seccomp.json
[root@bogon ~]# cat /etc/docker/
certs.d/ daemon.json key.json seccomp.json
[root@bogon ~]# cat /etc/docker/daemon.json
{}
[root@bogon ~]# echo {"registry-mirrors": ["https://hccwwfjl.mirror.aliyuncs.com"]}
{registry-mirrors: [https://hccwwfjl.mirror.aliyuncs.com]}
[root@bogon ~]# echo {"registry-mirrors": ["https://hccwwfjl.mirror.aliyuncs.com"]} > /etc/docker/daemon.json
[root@bogon ~]# cat /etc/docker/daemon.json
{registry-mirrors: [https://hccwwfjl.mirror.aliyuncs.com]}
[root@bogon ~]#
Connection timed out
Last login: Sat Sep 1 09:42:51 2018 from 192.168.1.102
[root@bogon ~]#
[root@bogon ~]# vi /etc/docker/daemon.json
{"registry-mirrors": ["https://hccwwfjl.mirror.aliyuncs.com"]}
"/etc/docker/daemon.json" 1L, 63C written
[root@bogon ~]# cat /etc/docker/daemon.json
{"registry-mirrors": ["https://hccwwfjl.mirror.aliyuncs.com"]}
[root@bogon ~]#
相关推荐
由于国内访问直接访问Docker hub网速比较慢,拉取镜像的时间就会比较长。一般我们会使用镜像加速或者直接从国内的一些平台镜像仓库上拉取。 我比较常用的是网易的镜像中心和daocloud镜像市场。 网易镜像中心:...
"Docker国内镜像拉取和镜像加速registry-mirrors配置修改" 在 Docker 中,镜像拉取和镜像加速是两个重要的概念。镜像拉取是指从 Docker Hub 或者其他镜像仓库中下载镜像的过程,而镜像加速是指使用镜像加速器来加速...
Docker 镜像拉取时的网络问题是 Docker 用户经常遇到的问题之一,尤其是在网络环境不稳定或访问 Docker Hub 受限的情况下。解决这些问题需要对 Docker 的工作原理和网络设置有一定的了解。以下是关于如何解决 Docker...
SpringBoot+SSM生成的jar包发布到docker,如果不是SpringBoot,则需要配置tomcat
docker 镜像配置便于拉取
在国内访问 Docker 官方的镜像,一直以来速度都慢如蜗牛。为了快速访问 Docker 官方镜像都会配置三方加速器,目前常用三方加速器有: 网易 、 USTC 、 DaoCloud 、 阿里云 。 现在 Docker 官方针对中国区推出了镜像...
Docker 拉取 oracle 11g镜像超详细配置,包含从docker拉取oracle11g镜像到oracle11g配置,最后到PLSQL连接oracle11g容器的超详细步骤。
docker minio官方镜像,完整镜像,可直接导入。使用,避免拉取镜像慢等问题,自测过可用
主要给大家介绍了关于Docker拉取镜像的完整步骤,文中通过示例代码介绍的非常详细,对大家学习或者使用Docker具有一定的参考学习价值,需要的朋友们下面来一起学习学习吧
达梦8版本学习docker版本镜像
七、Docker镜像迁移 使用Docker将镜像从一个主机迁移到另一个主机,可以使用以下命令:`docker save 镜像名 | bzip2 | ssh root@10.140.1.120 "cat | docker load"` 八、Docker解压镜像 使用Docker解压镜像可以...
网心云Docker镜像打包,命令行导入或者到宝塔直接使用;
Docker批量保存镜像到本地和批量载入本地镜像脚本 Docker保存镜像到本地 Docker导入本地镜像文件 Docker保存镜像到本地并导入本地镜像文件 Docker批量保存和载入镜像脚本
Docker Push 推送镜像:将本地构建好的Docker镜像推送到Docker Registry,供其他用户或机器拉取使用。 Docker Pull 拉取镜像:在其他机器或环境中,使用docker pull命令从Registry拉取需要的镜像。 运行容器:通过...
docker制作自定义化的tomcat镜像,满足项目自定义需求,相关文章指导可参考https://blog.csdn.net/Ber_Bai/article/details/119960730?spm=1001.2014.3001.5501
这将显示所有与 Ubuntu 相关的镜像。可以通过以下命令拉取镜像: docker pull ubuntu:latest 这将拉取最新的 Ubuntu 镜像。 四、容器创建 拉取镜像后,可以通过以下命令创建容器: docker run -it ubuntu:...
首先,我们需要从 Docker Hub 中拉取 Redis 镜像,可以使用以下命令: `docker pull redis:3.2` 这将从 Docker Hub 中拉取最新的 Redis 3.2 镜像。 2. 运行 Redis 容器 拉取镜像后,我们可以使用以下命令运行 ...
docker
资源包含Dockerfile文件,可以直接构建自己的nginx镜像
ubuntu系统gdal+java8环境的docker镜像,通过docker load命令导入。