Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
docker工具箱docker build behind proxy在windows中不工作_Docker_Dockerfile - Fatal编程技术网

docker工具箱docker build behind proxy在windows中不工作

docker工具箱docker build behind proxy在windows中不工作,docker,dockerfile,Docker,Dockerfile,已在windows中安装docker工具箱。 配置了一切 我们有公司代理。 因此,要配置代理,请执行以下操作。 添加了环境变量 set HTTP_PROXY=xx.xx.xx.xx:10015 set HTTPS_PROXY=xx.xx.xx.xx:10015 set NO_PROXY=192.168.99.100 然后使用以下命令创建新的虚拟机 docker-machine create -d virtualbox --engine-env HTTP_PROXY=xx.xx.xx.xx:

已在windows中安装docker工具箱。 配置了一切

我们有公司代理。 因此,要配置代理,请执行以下操作。 添加了环境变量

set HTTP_PROXY=xx.xx.xx.xx:10015 
set HTTPS_PROXY=xx.xx.xx.xx:10015 
set NO_PROXY=192.168.99.100
然后使用以下命令创建新的虚拟机

docker-machine create -d virtualbox --engine-env HTTP_PROXY=xx.xx.xx.xx:10015 --engine-env HTTPS_PROXY=xx.xx.xx.xx:10015 --engine-env NO_PROXY=192.168.99.100 default
docker build -t 1234567890.dkr.ecr.us-east-1.amazonaws.com/my-repository .
并尝试使用以下命令构建docker映像

docker-machine create -d virtualbox --engine-env HTTP_PROXY=xx.xx.xx.xx:10015 --engine-env HTTPS_PROXY=xx.xx.xx.xx:10015 --engine-env NO_PROXY=192.168.99.100 default
docker build -t 1234567890.dkr.ecr.us-east-1.amazonaws.com/my-repository .
这里有docker文件,它有如下命令

FROM centos:latest

MAINTAINER me - ./build_centos.sh

# Set correct environment variables.
ENV HOME /root
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8

RUN yum install -y curl; yum upgrade -y; yum update -y;  yum clean all
RUN yum -y update && yum -y install wget && yum -y install tar 
RUN yum install -y wget unzip

RUN curl --insecure --junk-session-cookies --location --remote-name --silent --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.rpm
RUN yum localinstall -y jdk-8u66-linux-x64.rpm
RUN rm jdk-8u66-linux-x64.rpm

ENV JAVA_HOME /usr/java/default

# RUN yum remove curl;  yum clean all
# centos-java8U60-ssh
RUN yum -y install openssh-server initscripts 
RUN echo "root:xxxxx" | chpasswd 
RUN /usr/sbin/sshd-keygen 
EXPOSE 22  
CMD ["/usr/sbin/sshd", "-D"] 

RUN mkdir /opt/myimage
COPY myjara-repository-0.0.1.jar /opt/myimage

WORKDIR /opt/myimage

EXPOSE 8091 
CMD java -jar myimage-repository-0.0.1.jar
但我有以下错误

Cannot find a valid baseurl for repo: base/7/x86_64
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#7 - "Failed to connect to 2a01:c0:2:4:0:acff:fe1e:1e52: Network is unreachable"
The command '/bin/sh -c yum -y update && yum -y install wget && yum -y install tar' returned a non-zero code: 1
如何解决这个问题