I'm a python developer. I'm new in docker. I would like to build my own image. I take form Docker Hub the python 3.7 version build on top of Debian. However when I try to update atp with apt-get -y update, docker stops the building of the image and raise an error.
My Dockerfile is the following:
FROM python:3.7 # some other commands RUN apt-get -y update # some other commands ENTRYPOINT ["python", "main.py"] The error that I get is
#13 0.654 Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B] #13 0.676 Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB] #13 0.685 Get:3 http://deb.debian.org/debian buster InRelease [121 kB] #13 0.779 Get:4 http://deb.debian.org/debian buster-updates InRelease [51.9 kB] #13 0.870 Get:5 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1090 B] #13 0.982 Get:6 http://security.debian.org/debian-security buster/updates/main amd64 Packages [258 kB] #13 0.982 Err:6 http://security.debian.org/debian-security buster/updates/main amd64 Packages #13 0.983 File has unexpected size (13293 != 258108). Mirror sync in progress? [IP: 199.232.138.132 80] #13 0.983 Hashes of expected file: #13 0.983 - Filesize:258108 [weak] #13 0.984 - SHA256:b7ca340d6ca71e1f8e2ca05da724786dbd3dbab5cef724b237280668073608e1 #13 0.984 - MD5Sum:ec6c3fc6556b5b52078a8304148e403b [weak] #13 0.984 Release file created at: Thu, 31 Dec 2020 15:31:33 +0000 #13 1.101 Get:7 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB] #13 1.102 Err:7 http://deb.debian.org/debian buster/main amd64 Packages #13 1.102 File has unexpected size (13243 != 7907472). Mirror sync in progress? [IP: 199.232.138.132 80] #13 1.102 Hashes of expected file: #13 1.102 - Filesize:7907472 [weak] #13 1.102 - SHA256:c88216232d353afbc95e57a5ad04fc515335fb75659dbcae6967cd1109b7e4fb #13 1.102 - MD5Sum:6043a440cb8038062bed716e76b3d7e7 [weak] #13 1.103 Release file created at: Sat, 05 Dec 2020 10:35:57 +0000 #13 1.291 Get:8 http://deb.debian.org/debian buster-updates/main amd64 Packages [7860 B] #13 1.292 Err:8 http://deb.debian.org/debian buster-updates/main amd64 Packages #13 1.292 File has unexpected size (13259 != 7860). Mirror sync in progress? [IP: 199.232.138.132 80] #13 1.292 Hashes of expected file: #13 1.292 - Filesize:7860 [weak] #13 1.292 - SHA256:55463230b47ea54463b1a8e687f24d60c0c8d4dccd1868ef26713e3fe11f7f20 #13 1.293 Release file created at: Thu, 31 Dec 2020 20:06:31 +0000 #13 1.302 Fetched 242 kB in 1s (244 kB/s) #13 1.302 Reading package lists... #13 1.315 E: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/main/binary-amd64/by-hash/SHA256/b7ca340d6ca71e1f8e2ca05da724786dbd3dbab5cef724b237280668073608e1 File has unexpected size (13293 != 258108). Mirror sync in progress? [IP: 199.232.138.132 80] #13 1.315 Hashes of expected file: #13 1.315 - Filesize:258108 [weak] #13 1.315 - SHA256:b7ca340d6ca71e1f8e2ca05da724786dbd3dbab5cef724b237280668073608e1 #13 1.315 - MD5Sum:ec6c3fc6556b5b52078a8304148e403b [weak] #13 1.315 Release file created at: Thu, 31 Dec 2020 15:31:33 +0000 #13 1.315 E: Failed to fetch http://deb.debian.org/debian/dists/buster/main/binary-amd64/by-hash/SHA256/c88216232d353afbc95e57a5ad04fc515335fb75659dbcae6967cd1109b7e4fb File has unexpected size (13243 != 7907472). Mirror sync in progress? [IP: 199.232.138.132 80] #13 1.315 Hashes of expected file: #13 1.315 - Filesize:7907472 [weak] #13 1.315 - SHA256:c88216232d353afbc95e57a5ad04fc515335fb75659dbcae6967cd1109b7e4fb #13 1.315 - MD5Sum:6043a440cb8038062bed716e76b3d7e7 [weak] #13 1.316 Release file created at: Sat, 05 Dec 2020 10:35:57 +0000 #13 1.316 E: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/main/binary-amd64/by-hash/SHA256/55463230b47ea54463b1a8e687f24d60c0c8d4dccd1868ef26713e3fe11f7f20 File has unexpected size (13259 != 7860). Mirror sync in progress? [IP: 199.232.138.132 80] #13 1.316 Hashes of expected file: #13 1.316 - Filesize:7860 [weak] #13 1.316 - SHA256:55463230b47ea54463b1a8e687f24d60c0c8d4dccd1868ef26713e3fe11f7f20 #13 1.316 Release file created at: Thu, 31 Dec 2020 20:06:31 +0000 #13 1.316 E: Some index files failed to download. They have been ignored, or old ones used instead. ------ executor failed running [/bin/sh -c apt-get -y update]: exit code: 100 I However, I tired the same Dockerfile in a ubuntu machine on AWS the container build the image starting from the same Dokerfile!
I really not able to figure out the problem.
Could you help me please?
I also tried with a dummy Dockerfile like:
FROM ubuntu:18.04 RUN apt-get update and I got the same error!
I'm really freaking out
Thank you
https://stackoverflow.com/questions/65526646/docker-desktop-on-mac-os-big-sur-11-1-makes-error-on-run-apt-get-y-update January 01, 2021 at 09:05AM
没有评论:
发表评论