ReproNim / neurodocker

Generate custom Docker and Singularity images, and minimize existing containers
https://www.repronim.org/neurodocker/
Apache License 2.0
326 stars 97 forks source link

fails to build image based on debian:testing -- might be intermittent debian issue or not #302

Closed yarikoptic closed 4 years ago

yarikoptic commented 4 years ago

we used debian testing in docker shortly before interactively and things worked fine. Now trying to build image using neurodocker

full script ```shell $> cat generate_container.sh #!/bin/bash set -eu generate() { #docker run --rm kaczmarj/neurodocker generate "$1" \ neurodocker generate "$1" \ --base=debian:testing \ --pkg-manager=apt \ --install python3-h5py python3-pip hdf5-tools \ --run "mkdir -p /opt/mpidemos" \ --copy test*.py /opt/mpidemos \ --run "chmod a+rX -R /opt/mpidemos" \ --run "python3 -m pip install pynwb" \ --user=nwb } generate docker > Dockerfile generate singularity > Singularity ```

but build of docker image (only) fails with

(git)smaug:~/proj/dandi/containers/pynwb-mpi[master]git
$> docker build .
Sending build context to Docker daemon  378.6MB
Step 1/13 : FROM debian:testing
 ---> ff31e2a6ba82
Step 2/13 : ARG DEBIAN_FRONTEND="noninteractive"
 ---> Using cache
 ---> 700559af0ec6
Step 3/13 : ENV LC_ALL "en_US.UTF-8" ND_ENTRYPOINT "/neurodocker/startup.sh" LANG "en_US.UTF-8"
 ---> Using cache
 ---> 2eca71f4f489
Step 4/13 : RUN export ND_ENTRYPOINT="/neurodocker/startup.sh"     && apt-get update -qq     && apt-get install -y -q --no-install-recommends            apt-utils            bzip2            ca-certificates            curl            locales            unzip     && apt-get clean     && rm -rf /var/lib/apt/lists/*     && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen     && dpkg-reconfigure --frontend=noninteractive locales     && update-locale LANG="en_US.UTF-8"     && chmod 777 /opt && chmod a+s /opt     && mkdir -p /neurodocker     && if [ ! -f "$ND_ENTRYPOINT" ]; then          echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT"     &&   echo 'set -e' >> "$ND_ENTRYPOINT"     &&   echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT"     &&   echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT";     fi     && chmod -R 777 /neurodocker && chmod a+s /neurodocker
 ---> Running in 91e9ee032b56
W: GPG error: http://httpredir.debian.org testing InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138
W: GPG error: http://httpredir.debian.org testing-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138
W: Failed to fetch http://security.debian.org/dists/testing/updates/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c export ND_ENTRYPOINT="/neurodocker/startup.sh"     && apt-get update -qq     && apt-get install -y -q --no-install-recommends            apt-utils            bzip2            ca-certificates            curl            locales            unzip     && apt-get clean     && rm -rf /var/lib/apt/lists/*     && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen     && dpkg-reconfigure --frontend=noninteractive locales     && update-locale LANG="en_US.UTF-8"     && chmod 777 /opt && chmod a+s /opt     && mkdir -p /neurodocker     && if [ ! -f "$ND_ENTRYPOINT" ]; then          echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT"     &&   echo 'set -e' >> "$ND_ENTRYPOINT"     &&   echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT"     &&   echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT";     fi     && chmod -R 777 /neurodocker && chmod a+s /neurodocker' returned a non-zero code: 100

apparently from looking at http://security-cdn.debian.org/dists/ for testing it should be not just testing but testing-security - so that might be the catch.

yarikoptic commented 4 years ago

neurodocker has nothing to do with setting up those apt sources. it was outdated debian:testing image. not sure how things worked for us "interactively"