居然是你

elasticsearch docker 拉取问题

Elasticsearch | 作者 zhushaolong | 发布于2018年03月19日 | 阅读数:7108

docker-compose文件内容:
version: "3"
services:
pcsoft:
build: ./docker-ng
ports:
- "8080:80"
- "8888:8888"
- "8881:8881"
- "8882:8882"
volumes: # 注意,要么使用相对路径,要么使用绝对路径,切勿使用变量
- ./www:/www/
restart: always

db:
image: mysql:5.7
volumes:
- ./dbdata:/var/lib/mysql/
expose:
- "3306"
ports:
- "3306:3306"
environment:
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
restart: always


elasticsearch_soft:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.2
container_name: elasticsearch_soft
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./docker-es/esdata_soft:/usr/share/elasticsearch/data
ports:
- 9200:9200
# networks:
# - esnet
elasticsearch_game:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.2
container_name: elasticsearch_game
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./docker-es/esdata_game:/usr/share/elasticsearch/data
# networks:
# - esnet

#volumes:
# esdata_soft:
# driver: local
# esdata_game:
# driver: local

#networks:
# esnet:
新版的elasticsearch docker image 通过(旧版的官方已经废弃了)
docker-compose up --build -d 

创建不了,报下面的错误。
ERROR: error pulling image configuration: Get https://d2iks1dkcwqcbx.cloudfr ... AJQQ: net/http: TLS handshake timeout
请问该如何解决?
自己已经尝试通过增加阿里云容器镜像,开小飞机都不好使。阿里云镜像没效果是因为镜像不在dockerhub或者docker store上,但是小飞机开启后还是不行,该怎么办呢?
已邀请:

zhushaolong - 90后IT男

赞同来自:

解决方案,使用阿里云ecs,执行
docker-compose up --build -d
然后,在阿里云中创建镜像仓库
阿里云镜像仓库创建:
第一步:搜索容器镜像服务
深度截图_选择区域_20180320114443.png

第二步:创建镜像仓库
深度截图_选择区域_20180320114911.png

第三步:登陆阿里云仓库,提交镜像
sudo docker login --username=15210900722@163.com registry.cn-hangzhou.aliyuncs.com
[root@izbp19zewzxzwm3i0hxnh3z pcsoft_docker]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
pcsoftdocker_pcsoft latest d89348ae61e8 About an hour ago 408MB
mysql 5.7 5195076672a7 5 days ago 371MB
centos 7 2d194b392dd1 2 weeks ago 195MB
docker.elastic.co/elasticsearch/elasticsearch 6.2.2 576825ff4f5a 4 weeks ago 574MB

[root@izbp19zewzxzwm3i0hxnh3z pcsoft_docker]# sudo docker tag docker.elastic.co/elasticsearch/elasticsearch:6.2.2 registry.cn-hangzhou.aliyuncs.com/amor/elastic:6.2.2
[root@izbp19zewzxzwm3i0hxnh3z pcsoft_docker]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
pcsoftdocker_pcsoft latest d89348ae61e8 About an hour ago 408MB
mysql 5.7 5195076672a7 5 days ago 371MB
centos 7 2d194b392dd1 2 weeks ago 195MB
docker.elastic.co/elasticsearch/elasticsearch 6.2.2 576825ff4f5a 4 weeks ago 574MB
registry.cn-hangzhou.aliyuncs.com/amor/elastic 6.2.2 576825ff4f5a 4 weeks ago 574MB

[root@izbp19zewzxzwm3i0hxnh3z pcsoft_docker]# docker push registry.cn-hangzhou.aliyuncs.com/amor/elastic:6.2.2
The push refers to repository [registry.cn-hangzhou.aliyuncs.com/amor/elastic]
2689285160df: Pushed
125bb50382b3: Pushed
a19681a42559: Pushing 28.39MB/158.7MB
f75151a01032: Pushed
2d556bb86464: Pushing 79.53MB/207.4MB
e15afa4858b6: Pushing 79.31MB/207.2MB

要回复问题请先登录注册