I’m trying to run repo2docker behind a corporate proxy but it fails while trying to run apt-get when building the docker image with the following errors:
Using PythonBuildPack builder
Step 1/48 : FROM buildpack-deps:bionic
---> 62eb152e890f
Step 2/48 : ENV DEBIAN_FRONTEND=noninteractive
---> Using cache
---> c65e21e2fae9
Step 3/48 : RUN apt-get -qq update && apt-get -qq install --yes --no-install-recommends locales > /dev/null && apt-get -qq purge && apt-get -qq clean && rm -rf /var/lib/apt/lists/*
---> Running in 1458724cd0dd
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.91.23), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Unable to connect to archive.ubuntu.com:http:
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Unable to connect to archive.ubuntu.com:http:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Could not connect to security.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.23), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.26), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.152), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Package 'locales' has no installation candidate
Removing intermediate container 1458724cd0dd
The command '/bin/sh -c apt-get -qq update && apt-get -qq install --yes --no-install-recommends locales > /dev/null && apt-get -qq purge && apt-get -qq clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100The command '/bin/sh -c apt-get -qq update && apt-get -qq install --yes --no-install-recommends locales > /dev/null && apt-get -qq purge && apt-get -qq clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
Traceback (most recent call last):
File "/home/vagrant/miniconda/lib/python3.7/site-packages/repo2docker/__main__.py", line 340, in main
r2d.start()
File "/home/vagrant/miniconda/lib/python3.7/site-packages/repo2docker/app.py", line 687, in start
self.build()
File "/home/vagrant/miniconda/lib/python3.7/site-packages/repo2docker/app.py", line 673, in build
raise docker.errors.BuildError(l['error'], build_log='')
docker.errors.BuildError: The command '/bin/sh -c apt-get -qq update && apt-get -qq install --yes --no-install-recommends locales > /dev/null && apt-get -qq purge && apt-get -qq clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100[vagrant@ol7-docker-engine oracle]$ Connection to 127.0.0.1 closed by remote host.
Connection to 127.0.0.1 closed.
Docker works fine by itself so I think the problem is that I need to pass build args to the image. How would I do that?