一、配置代理:
Ubuntu下路径是:
/etc/default/docker
不是
/etc/systemd/system/docker.service.d/docker-proxy.conf
/etc/systemd/system/docker.service.d/http-proxy.conf
/etc/systemd/system/docker.service.d/https-proxy.conf
故往/etc/default/docker中加入配置:
export http_proxy="http://127.0.0.1:3128"
export https_proxy="http://127.0.0.1:3128"
export no_proxy="localhost,127.0.0.1"
需要把proxy具体的地址替换上面的127.0.0.1
配置好后重启docker:
sudo service docker restart
结果:
* Stopping Docker: docker [ OK ]
* Starting Docker: docker [ OK ]
二、校验是否配对:
docker info
可以看到配置好的proxi地址
docker查找镜像Spark:
docker search spark
结果:
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
bitnami/spark Bitnami Spark Docker Image 106
apache/spark-py 8
sparklyballs/acestream 6 [OK]
sparklyballs/sparkly-mythtv 6 [OK]
sparkserver/spark-server The spark-server is a Node.js REST interface… 4 [OK]
apache/spark Apache Spark 4
sparklyballs/handbrake 3 [OK]
apache/beam_spark_job_server Apache Beam Spark Job Server 2
sparklyballs/krusader 2 [OK]
sparkprime/jsonnet Jsonnet templating language (jsonnet.org) 2 [OK]
sparklyballs/dokuwiki 1 [OK]
sparkfabrik/spark-k8s-deployer This images is to be used to build and deplo… 1 [OK]
sparklegion/worker 1
rancher/spark 1
sparklyballs/tftp-server 1 [OK]
sparkpos/docker-nginx-php sparkpos nginx php 1 [OK]
apache/spark-r R on Spark 0
elyra/spark-r Base image containing the Spark 2.4.0 for R 0
sparklyballs/filezilla 0 [OK]
sparkgeo/aop2envi aop2envi 0 [OK]
rancher/spark-conf 0
sparky63/docker-homeseer4 0
sparklyballs/puddletag 0 [OK]
elyra/spark-py Base image containing the Spark 2.4.0 for Py… 0
elyra/spark Base image containing Spark
拉取镜像:
docker pull bitnami/spark
6cabe07f8b91: Pull complete
acb16208ade4: Pull complete
0e2353730fce: Pull complete
2d44b7ef2708: Pull complete
cb3e7514f9fe: Pull complete
66ec452a7b4d: Pull complete
f036badc52cc: Downloading [========================================> ] 389.1MB/483.5MB
f036badc52cc: Downloading [========================================> ] 389.6MB/483.5MB
f036badc52cc: Downloading [========================================> ] 390.2MB/483.5MB
查看是否下载成功:
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
bitnami/spark latest 92cfdff6d56c 4 days ago 2.54GB
三、问题:
Error response from daemon:Get https://index.docker.io/v1/search?q=&n=25:net/http: TLS timeout
参考:
【1】 Docker网络代理设置_whatday的博客-_docker配置代理