4

I'm using docker toolbox on my Windows machine. I'm trying to build this project from github https://github.com/pyannote/pyannote-video. When I build an image by running docker build -t pyannote/video ., I get the following error:

Get:17 http://archive.ubuntu.com/ubuntu/ trusty-updates/main python-setuptools all 3.3-1ubuntu2 [230 kB]
Err http://archive.ubuntu.com/ubuntu/ trusty-updates/universe python-pip all 1.5.4-1ubuntu3
  404  Not Found [IP: 91.189.88.149 80]
Fetched 1658 kB in 21s (78.5 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip-whl_1.5.4-1ubuntu3_all.deb  404  Not Found [IP: 91.189.88.1
9 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip_1.5.4-1ubuntu3_all.deb  404  Not Found [IP: 91.189.88.149 8
]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends     python     python-dev     python-pip' returned
a non-zero code: 100

I checked on http://archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/. There is python-pip_1.5.4-1ubuntu4_all.deb instead of python-pip_1.5.4-1ubuntu3_all.deb.

The output is asking me to run apt-get update or try with --fix-missing, but I'm running docker on Windows. Run apt-get will return command not found. What should I do to fix this?

0xc0de
  • 8,028
  • 5
  • 49
  • 75
BooYaah
  • 51
  • 1
  • 8

2 Answers2

10

Edit the Dockerfile and change line 5 from this:

RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \

to this:

RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -yq --no-install-recommends \
                                   ^ Add this part ^

Then tell whoever wrote that Dockerfile to read this.

jwodder
  • 54,758
  • 12
  • 108
  • 124
  • He is running docker on windows, It's not possible to run linux containers under windows, Am I right? – Farhad Farahi Sep 15 '16 at 19:03
  • 2
    @Farhad: If by "Linux containers" you mean [LXC](https://en.wikipedia.org/wiki/LXC), this answer has nothing to do with that. If you just mean containerized Linux instances in general, what do you think Docker is? – jwodder Sep 15 '16 at 19:10
  • I mean Containerized Linux instances under docker installed in windows. http://stackoverflow.com/questions/33190469/linux-machine-with-docker-deploy-windows-container – Farhad Farahi Sep 15 '16 at 19:13
  • @Farhad: Read the second paragraph of the answer there: "You certainly can run those Linux containers on any Windows machine through a VM. That is what docker toolbox will install." And the OP is using Docker Toolbox. – jwodder Sep 15 '16 at 19:16
  • Thanks for the info , and the vm is booted via boot2docker, Probably not the best idea performance wise. – Farhad Farahi Sep 15 '16 at 19:27
2

I've found that often Docker will cache the apt-get update step, and if dependencies or their locations have changed in the interim, your apt-get isn't really doing you any good. Running your docker build command with the --no-cache flag can force these cached layers to run and circumvent this.

mayosten
  • 634
  • 5
  • 17