mmh352 / ou-container-builder

0 stars 2 forks source link

Build error when running demo #9

Closed psychemedia closed 3 years ago

psychemedia commented 3 years ago

Running a demo from the current repo raises an error in the build when trying to pull from the apt repo (unsigned?).

[+] Building 1.2s (7/17)                                                        
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 1.06kB                                     0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for docker.io/library/python:3.9-slim-buster  0.5s
 => [ 1/13] FROM docker.io/library/python:3.9-slim-buster@sha256:d35ab472  0.0s
 => [internal] load build context                                          0.0s
 => => transferring context: 1.07kB                                        0.0s
 => CACHED [ 2/13] RUN mkdir /home/ou-user &&     useradd -u 1000 -g 100   0.0s
 => ERROR [ 3/13] RUN apt-get update -y &&     apt-get install -y tini gi  0.6s
------                                                                          
 > [ 3/13] RUN apt-get update -y &&     apt-get install -y tini git:            
#6 0.370 Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]                                                                    
#6 0.382 Get:2 http://deb.debian.org/debian buster InRelease [121 kB]           
#6 0.401 Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]  
#6 0.439 Err:1 http://security.debian.org/debian-security buster/updates InRelease
#6 0.439   At least one invalid signature was encountered.
#6 0.496 Err:2 http://deb.debian.org/debian buster InRelease
#6 0.496   At least one invalid signature was encountered.
#6 0.549 Err:3 http://deb.debian.org/debian buster-updates InRelease
#6 0.549   At least one invalid signature was encountered.
#6 0.554 Reading package lists...
#6 0.562 W: GPG error: http://security.debian.org/debian-security buster/updates InRelease: At least one invalid signature was encountered.
#6 0.562 E: The repository 'http://security.debian.org/debian-security buster/updates InRelease' is not signed.
#6 0.562 W: GPG error: http://deb.debian.org/debian buster InRelease: At least one invalid signature was encountered.
#6 0.562 E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed.
#6 0.562 W: GPG error: http://deb.debian.org/debian buster-updates InRelease: At least one invalid signature was encountered.
#6 0.562 E: The repository 'http://deb.debian.org/debian buster-updates InRelease' is not signed.
------
executor failed running [/bin/sh -c apt-get update -y &&     apt-get install -y tini git]: exit code: 100
mmh352 commented 3 years ago

Very strange. I've just run it myself and it builds fine. I would suggest removing the python:3.9-slim-buster image and running docker image prune to clear as much as possible and then re-building. My guess on this error would be that it is somehow caused by a network error.

psychemedia commented 3 years ago

Yeah, I did some housekeeping just in case, but it's still not happy. I did wonder whether the tagged image you seem to be using (from the build trace, I see [ 1/10] FROM docker.io/library/python:3.9-slim-buster@sha256:d35ab472) has some apt-repo settings that are somehow stale?

mmh352 commented 3 years ago

What version of docker are you running and what operating system?

psychemedia commented 3 years ago

Ah, ok.. it may be a space issue with Docker on Mac (eg https://github.com/docker-library/php/issues/898#issuecomment-663308301); just done some proper housekeeping and that appears to fix it.

Weird - I've not noticed the same issue with other builds recently. Hmm...

This is a good gotcha to know though, eg when in the forums handling student issues...

mmh352 commented 3 years ago

Excellent. I'm also glad that it builds on Mac at all :-), since I can't test that.