jupyterhub-deploy-docker
jupyterhub-deploy-docker copied to clipboard
getdocker ca-certificates configuration fail inside main docker
Running make build to build the container for the hub fails during the installation of Docker via the script from https://get.docker.com.
It seems apt-get install -y -q apt-transport-https ca-certificates tries to upgrade and reconfigure the ca-certificates package (I'm not sure why if apt-get update && apt-get upgrade already ran in jupyterhub/jupyterhub . . .). But the dpkg ... --configure ... part can't find the certificates it expects under ./mozilla/
Any help appreciated!
Reading package lists...
+ sh -c sleep 3; apt-get install -y -q apt-transport-https ca-certificates
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
apt-transport-https
The following packages will be upgraded:
ca-certificates
1 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
Need to get 344 kB of archives.
After this operation, 281 kB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian/ jessie/main apt-transport-https amd64 1.0.9.8.4 [138 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian/ jessie/main ca-certificates all 20141019+deb8u2 [207 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 344 kB in 0s (7254 kB/s)
Selecting previously unselected package apt-transport-https.
(Reading database ... 11146 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.0.9.8.4_amd64.deb ...
Unpacking apt-transport-https (1.0.9.8.4) ...
Preparing to unpack .../ca-certificates_20141019+deb8u2_all.deb ...
Unpacking ca-certificates (20141019+deb8u2) over (20141019+deb8u1) ...
Setting up apt-transport-https (1.0.9.8.4) ...
Setting up ca-certificates (20141019+deb8u2) ...
find: `./mozilla/NetLock_Notary_=Class_A=_Root.crt': No such file or directory
find: `./mozilla/Verisign_Class_1_Public_Primary_Certification_Authority_-_G2.crt': No such file or directory
find: `./mozilla/NetLock_Express_=Class_C=_Root.crt': No such file or directory
find: `./mozilla/CA_Disig.crt': No such file or directory
find: `./mozilla/Verisign_Class_3_Public_Primary_Certification_Authority_2.crt': No such file or directory
find: `./mozilla/Staat_der_Nederlanden_Root_CA.crt': No such file or directory
find: `./mozilla/Verisign_Class_3_Public_Primary_Certification_Authority_-_G2.crt': No such file or directory
find: `./mozilla/NetLock_Qualified_=Class_QA=_Root.crt': No such file or directory
find: `./mozilla/Sonera_Class_1_Root_CA.crt': No such file or directory
find: `./mozilla/NetLock_Business_=Class_B=_Root.crt': No such file or directory
mv: cannot move ‘/etc/ca-certificates.conf’ to a subdirectory of itself, ‘/etc/ca-certificates.conf.dpkg-old’
dpkg: error processing package ca-certificates (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
ca-certificates
E: Sub-process /usr/bin/dpkg returned an error code (1)
ERROR: Service 'hub' failed to build: The command '/bin/sh -c wget https://get.docker.com -q -O /tmp/getdocker && chmod +x /tmp/getdocker && sh /tmp/getdocker' returned a non-zero code: 100
make: *** [Makefile:47: build] Error 1
The hub image build completes if the command to (re-)install ca-certificates is omitted form the docker install script.
wget https://get.docker.com -q -O ./getdocker_alt
## delete ca-certiticates from line 465 leaving "apt-get install -y -q apt-transport-https"
vim getdocker_alt
Then change Dockerfile.jupyterhub to install Docker via:
ADD getdocker_alt /tmp
RUN chmod +x /tmp/getdocker_alt && \
sh /tmp/getdocker_alt
But this doesn't explain the reason for the initial failed build . . . .
Hi @daveuu. I am able to build the JupyterHub Docker image on my Mac without issue. It worked using both FROM jupyterhub/jupyterhub-onbuild:0.7.0 and FROM jupyterhub/jupyterhub-onbuild:0.7.2 as the base image.
+ sh -c sleep 3; apt-get install -y -q apt-transport-https ca-certificates
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
apt-transport-https
The following packages will be upgraded:
ca-certificates
1 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
Need to get 344 kB of archives.
After this operation, 281 kB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian/ jessie/main apt-transport-https amd64 1.0.9.8.4 [138 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian/ jessie/main ca-certificates all 20141019+deb8u2 [207 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 344 kB in 0s (3433 kB/s)
Selecting previously unselected package apt-transport-https.
(Reading database ... 11146 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.0.9.8.4_amd64.deb ...
Unpacking apt-transport-https (1.0.9.8.4) ...
Preparing to unpack .../ca-certificates_20141019+deb8u2_all.deb ...
Unpacking ca-certificates (20141019+deb8u2) over (20141019+deb8u1) ...
Setting up apt-transport-https (1.0.9.8.4) ...
Setting up ca-certificates (20141019+deb8u2) ...
/usr/sbin/update-ca-certificates: [--verbose] [--fresh]
Processing triggers for ca-certificates (20141019+deb8u2) ...
Updating certificates in /etc/ssl/certs... 10 added, 10 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
Base images:
$ docker images|grep hub
jupyterhub latest 31f3613e1b44 About an hour ago 795MB
jupyterhub/jupyterhub-onbuild 0.7.2 7070de919dfa 3 months ago 686MB
jupyterhub/jupyterhub-onbuild 0.7.0 8abb86b3aab4 4 months ago 671MB
From which base image are you building, and on which platform?
@daveuu Did you ever resolve your build issue wrt ca-certificates? I cloned the latest master again today and was able to build successfully.