Aws codebuild, all builds failing - docker

I'm having an issue with AWS codebuild. My setup has worked for the last year with no issue. Last night all my builds started failing.
Log below.
As far as I can see, this is failing before it even gets to my docker file so I have no control over installing the required key before doing the apt update. It does the same thing no matter which AWS build environment i specify.
Any help would be greatly appreciated.
[Container] 2023/01/25 11:08:31 Waiting for agent ping
[Container] 2023/01/25 11:08:32 Waiting for DOWNLOAD_SOURCE
[Container] 2023/01/25 11:09:01 Phase is DOWNLOAD_SOURCE
[Container] 2023/01/25 11:09:01 CODEBUILD_SRC_DIR=/codebuild/output/src499283105/src/github.com/TeamTizo/Tizohub
[Container] 2023/01/25 11:09:01 YAML location is /codebuild/output/src499283105/src/github.com/TeamTizo/Tizohub/buildspec.yml
[Container] 2023/01/25 11:09:01 Setting HTTP client timeout to higher timeout for Github and GitHub Enterprise sources
[Container] 2023/01/25 11:09:01 Processing environment variables
[Container] 2023/01/25 11:09:01 Setting HTTP client timeout to higher timeout for Github and GitHub Enterprise sources
[Container] 2023/01/25 11:09:01 Setting HTTP client timeout to higher timeout for Github and GitHub Enterprise sources
[Container] 2023/01/25 11:09:01 No runtime version selected in buildspec.
[Container] 2023/01/25 11:09:03 Moving to directory /codebuild/output/src499283105/src/github.com/TeamTizo/Tizohub
[Container] 2023/01/25 11:09:03 Configuring ssm agent with target id: codebuild:a8fabfec-8d23-4369-bfcd-40ebd15907f6
[Container] 2023/01/25 11:09:03 Successfully updated ssm agent configuration
[Container] 2023/01/25 11:09:03 Registering with agent
[Container] 2023/01/25 11:09:03 Phases found in YAML: 4
[Container] 2023/01/25 11:09:03 INSTALL: 3 commands
[Container] 2023/01/25 11:09:03 PRE_BUILD: 9 commands
[Container] 2023/01/25 11:09:03 BUILD: 3 commands
[Container] 2023/01/25 11:09:03 POST_BUILD: 3 commands
[Container] 2023/01/25 11:09:03 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED
[Container] 2023/01/25 11:09:03 Phase context status code: Message:
[Container] 2023/01/25 11:09:03 Entering phase INSTALL
[Container] 2023/01/25 11:09:03 Running command ls -alt
total 272
drwxr-xr-x 3 root root 21 Jan 25 11:09 ..
drwxr-xr-x 9 root root 147 Jan 25 11:09 writable
drwxr-xr-x 10 root root 4096 Jan 25 11:09 .
drwxr-xr-x 36 root root 4096 Jan 25 11:09 system
-rw-r--r-- 1 root root 384 Jan 25 11:09 th_env.php
drwxr-xr-x 3 root root 173 Jan 25 11:09 public
-rw-r--r-- 1 root root 2236 Jan 25 11:09 spark
-rw-r--r-- 1 root root 3895 Jan 25 11:08 package-lock.json
-rw-r--r-- 1 root root 2061 Jan 25 11:08 phpunit.xml.dist
drwxr-xr-x 49 root root 4096 Jan 25 11:08 modules
-rw-r--r-- 1 root root 0 Jan 25 11:08 error.log
-rw-r--r-- 1 root root 1870 Jan 25 11:08 buildspec.yml
-rw-r--r-- 1 root root 1861 Jan 25 11:08 composer.json
-rw-r--r-- 1 root root 222990 Jan 25 11:08 composer.lock
drwxr-xr-x 3 root root 20 Jan 25 11:08 devops
drwxr-xr-x 14 root root 248 Jan 25 11:08 app
drwxr-xr-x 4 root root 36 Jan 25 11:08 build
-rw-r--r-- 1 root root 684 Jan 25 11:08 .env
-rw-r--r-- 1 root root 2038 Jan 25 11:08 .gitignore
-rw-r--r-- 1 root root 1159 Jan 25 11:08 LICENSE
-rw-r--r-- 1 root root 31 Jan 25 11:08 README.md
drwxr-xr-x 4 root root 87 Jan 25 11:08 .git
[Container] 2023/01/25 11:09:03 Running command apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:2 https://apt.corretto.aws stable InRelease [10.7 kB]
Get:3 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy InRelease [23.8 kB]
Get:4 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:8 https://apt.corretto.aws stable/main amd64 Packages [11.8 kB]
Get:9 https://apt.corretto.aws stable/main i386 Packages [3514 B]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted i386 Packages [31.1 kB]
Get:11 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages [990 B]
Get:12 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [4732 B]
Get:13 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [293 kB]
Get:14 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [793 kB]
Get:15 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [740 kB]
Get:16 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [681 kB]
Get:17 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages [605 kB]
Get:18 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main i386 Packages [2955 B]
Get:19 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main amd64 Packages [2960 B]
Err:4 https://dl.yarnpkg.com/debian stable InRelease
The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn#dan.cx>
Get:20 http://archive.ubuntu.com/ubuntu jammy/universe i386 Packages [9385 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy/multiverse i386 Packages [134 kB]
Get:23 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:26 http://archive.ubuntu.com/ubuntu jammy/restricted i386 Packages [36.7 kB]
Get:27 http://archive.ubuntu.com/ubuntu jammy/main i386 Packages [1324 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1055 kB]
Get:29 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [730 kB]
Get:30 http://archive.ubuntu.com/ubuntu jammy-updates/restricted i386 Packages [31.5 kB]
Get:31 http://archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [705 kB]
Get:32 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [8978 B]
Get:33 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [516 kB]
Get:34 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse i386 Packages [1738 B]
Get:35 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [999 kB]
Get:36 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [7286 B]
Get:37 http://archive.ubuntu.com/ubuntu jammy-backports/universe i386 Packages [5545 B]
Get:38 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [3520 B]
Get:39 http://archive.ubuntu.com/ubuntu jammy-backports/main i386 Packages [3479 B]
Reading package lists...
W: https://apt.corretto.aws/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn#dan.cx>
E: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.
[Container] 2023/01/25 11:09:09 Command did not exit successfully apt update exit status 100
[Container] 2023/01/25 11:09:09 Phase complete: INSTALL State: FAILED
[Container] 2023/01/25 11:09:09 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: apt update. Reason: exit status 100

Did you try running it in privileged mode?
Codebuild->Edit->Environment->Override Image->Privileged mode

There was a CodeBuild Ubuntu images issue which is now fixed. Refer here.

Related

Docker build on tensorflow version 2.4.3 gives out public key errors

i am trying to build a docker from the tensorflow dockerhub, using tensorflow version 2.4.3, i did a simple pull and docker file:
$ docker pull tensorflow/tensorflow:2.4.2-gpu
And here is the dockerfile:
FROM tensorflow/tensorflow:2.4.3-gpu
ADD . /path
WORKDIR /path
RUN apt-get -y update
RUN apt-get -y install sudo
However i get errors on the apt-get update line:
$ docker build -t tensorflow_gpu_build .
...
Step 4/10 : RUN apt-get -y update
---> Running in 7c67f26124cb
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease [1581 B]
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1573 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
Err:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease
The following signatures couldn''t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
Get:7 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [3145 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [1371 kB]
Ign:9 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 InRelease
Hit:10 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 Release
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [1412 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [22.9 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2351 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [3568 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [30.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [64.0 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [20.5 kB]
Reading package lists...
W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn''t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease' is no longer signed.
I am unsure of where the problem is coming from, the same dockerfile worked fine on the latest tensorfow docker version, could it be normal behaviour because the tensorflow version is a little old?
It's possible that the key included in the image has been revoked by Nvidia in the meantime.
So, you have three possibilities:
You can check for a valid pub key for that repository, copy it to the image via Dockerfile and add it with this command:
apt-key add /path/to/key
You can add an "[ allow-insecure=yes ]" to the respective line in the /etc/apt/sources.list as elaborated here: https://unix.stackexchange.com/questions/198000/bypass-gpg-signature-checks-only-for-a-single-repository
You could try a newer image.

GitLab CI command not found when using docker

I feel like I have tried everything, and don't understand why commands can't be found in my GitLab CI script.
Here is my script
stages:
- build
build:
image: ubuntu:20.04
stage: build
only:
- master
tags:
- docker
script:
- adduser --disabled-password --gecos "" meteor_install
- apt update -y
- apt install curl -y
- su meteor_install
- echo $0
- cd ~
- ls -alh
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
- ls -alh
- source ~/.bashrc
- cat ~/.bashrc
- export NVM_DIR="$HOME/.nvm"
- nvm install 12.13.1
- npm i -g meteor
- meteor --version
- npm install -g mup
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- meteor npm install
- cd .deploy
- mup setup
- mup deploy
Here is the result, whith quite a lot of debugging information
Running with gitlab-runner 14.5.1 (de104fcd)
on docker RKp3-YrG
Preparing the "docker" executor
Using Docker executor with image ubuntu:20.04 ...
Pulling docker image ubuntu:20.04 ...
Using docker image sha256:ba6acccedd2923aee4c2acc6a23780b14ed4b8a5fa4e14e252a23b846df9b6c1 for ubuntu:20.04 with digest ubuntu#sha256:626ffe58f6e7566e00254b638eb7e0f3b11d4da9675088f4781a50ae288f3322 ...
Preparing environment 00:04
Running on runner-rkp3-yrg-project-10-concurrent-0 via gitlab-runner...
Getting source from Git repository 00:07
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/soxprox/apps/soxprox-code-server/soxprox_code_server_gui/.git/
Checking out 5c925242 as master...
Skipping Git submodules setup
Executing "step_script" stage of the job script 01:42
Using docker image sha256:ba6acccedd2923aee4c2acc6a23780b14ed4b8a5fa4e14e252a23b846df9b6c1 for ubuntu:20.04 with digest ubuntu#sha256:626ffe58f6e7566e00254b638eb7e0f3b11d4da9675088f4781a50ae288f3322 ...
$ adduser --disabled-password --gecos "" meteor_install
Adding user `meteor_install' ...
Adding new group `meteor_install' (1000) ...
Adding new user `meteor_install' (1000) with group `meteor_install' ...
Creating home directory `/home/meteor_install' ...
Copying files from `/etc/skel' ...
$ apt update -y
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1335 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [30.1 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [828 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [733 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [33.6 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1108 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1758 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [797 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [21.7 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [50.8 kB]
Fetched 20.1 MB in 4s (5258 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
1 package can be upgraded. Run 'apt list --upgradable' to see it.
$ apt install curl -y
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
ca-certificates krb5-locales libasn1-8-heimdal libbrotli1 libcurl4
libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal
libheimntlm0-heimdal libhx509-5-heimdal libk5crypto3 libkeyutils1
libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common
libnghttp2-14 libpsl5 libroken18-heimdal librtmp1 libsasl2-2
libsasl2-modules libsasl2-modules-db libsqlite3-0 libssh-4 libssl1.1
libwind0-heimdal openssl publicsuffix
Suggested packages:
krb5-doc krb5-user libsasl2-modules-gssapi-mit
| libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp
libsasl2-modules-sql
The following NEW packages will be installed:
ca-certificates curl krb5-locales libasn1-8-heimdal libbrotli1 libcurl4
libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal
libheimntlm0-heimdal libhx509-5-heimdal libk5crypto3 libkeyutils1
libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common
libnghttp2-14 libpsl5 libroken18-heimdal librtmp1 libsasl2-2
libsasl2-modules libsasl2-modules-db libsqlite3-0 libssh-4 libssl1.1
libwind0-heimdal openssl publicsuffix
0 upgraded, 32 newly installed, 0 to remove and 1 not upgraded.
Need to get 5447 kB of archives.
After this operation, 16.7 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libssl1.1 amd64 1.1.1f-1ubuntu2.10 [1322 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 openssl amd64 1.1.1f-1ubuntu2.10 [620 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ca-certificates all 20210119~20.04.2 [145 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libsqlite3-0 amd64 3.31.1-4ubuntu0.2 [549 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 krb5-locales all 1.17-6ubuntu4.1 [11.4 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libkrb5support0 amd64 1.17-6ubuntu4.1 [30.9 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libk5crypto3 amd64 1.17-6ubuntu4.1 [79.9 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 libkeyutils1 amd64 1.6-6ubuntu1 [10.2 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libkrb5-3 amd64 1.17-6ubuntu4.1 [330 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgssapi-krb5-2 amd64 1.17-6ubuntu4.1 [121 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 libpsl5 amd64 0.21.0-1ubuntu1 [51.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 publicsuffix all 20200303.0012-1 [111 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libbrotli1 amd64 1.0.7-6ubuntu0.1 [267 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal/main amd64 libroken18-heimdal amd64 7.7.0+dfsg-1ubuntu1 [41.8 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal/main amd64 libasn1-8-heimdal amd64 7.7.0+dfsg-1ubuntu1 [181 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 libheimbase1-heimdal amd64 7.7.0+dfsg-1ubuntu1 [29.7 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal/main amd64 libhcrypto4-heimdal amd64 7.7.0+dfsg-1ubuntu1 [87.9 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal/main amd64 libwind0-heimdal amd64 7.7.0+dfsg-1ubuntu1 [48.0 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal/main amd64 libhx509-5-heimdal amd64 7.7.0+dfsg-1ubuntu1 [107 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/main amd64 libkrb5-26-heimdal amd64 7.7.0+dfsg-1ubuntu1 [208 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal/main amd64 libheimntlm0-heimdal amd64 7.7.0+dfsg-1ubuntu1 [15.1 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal/main amd64 libgssapi3-heimdal amd64 7.7.0+dfsg-1ubuntu1 [96.1 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/main amd64 libsasl2-modules-db amd64 2.1.27+dfsg-2 [14.9 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal/main amd64 libsasl2-2 amd64 2.1.27+dfsg-2 [49.3 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libldap-common all 2.4.49+dfsg-2ubuntu1.8 [16.6 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libldap-2.4-2 amd64 2.4.49+dfsg-2ubuntu1.8 [155 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal/main amd64 libnghttp2-14 amd64 1.40.0-1build1 [78.7 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2build1 [54.9 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libssh-4 amd64 0.9.3-2ubuntu2.2 [170 kB]
Get:30 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4 amd64 7.68.0-1ubuntu2.7 [234 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 curl amd64 7.68.0-1ubuntu2.7 [161 kB]
Get:32 http://archive.ubuntu.com/ubuntu focal/main amd64 libsasl2-modules amd64 2.1.27+dfsg-2 [49.1 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 5447 kB in 0s (13.6 MB/s)
Selecting previously unselected package libssl1.1:amd64.
(Reading database ... 4127 files and directories currently installed.)
Preparing to unpack .../00-libssl1.1_1.1.1f-1ubuntu2.10_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1f-1ubuntu2.10) ...
Selecting previously unselected package openssl.
Preparing to unpack .../01-openssl_1.1.1f-1ubuntu2.10_amd64.deb ...
Unpacking openssl (1.1.1f-1ubuntu2.10) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../02-ca-certificates_20210119~20.04.2_all.deb ...
Unpacking ca-certificates (20210119~20.04.2) ...
Selecting previously unselected package libsqlite3-0:amd64.
Preparing to unpack .../03-libsqlite3-0_3.31.1-4ubuntu0.2_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.31.1-4ubuntu0.2) ...
Selecting previously unselected package krb5-locales.
Preparing to unpack .../04-krb5-locales_1.17-6ubuntu4.1_all.deb ...
Unpacking krb5-locales (1.17-6ubuntu4.1) ...
Selecting previously unselected package libkrb5support0:amd64.
Preparing to unpack .../05-libkrb5support0_1.17-6ubuntu4.1_amd64.deb ...
Unpacking libkrb5support0:amd64 (1.17-6ubuntu4.1) ...
Selecting previously unselected package libk5crypto3:amd64.
Preparing to unpack .../06-libk5crypto3_1.17-6ubuntu4.1_amd64.deb ...
Unpacking libk5crypto3:amd64 (1.17-6ubuntu4.1) ...
Selecting previously unselected package libkeyutils1:amd64.
Preparing to unpack .../07-libkeyutils1_1.6-6ubuntu1_amd64.deb ...
Unpacking libkeyutils1:amd64 (1.6-6ubuntu1) ...
Selecting previously unselected package libkrb5-3:amd64.
Preparing to unpack .../08-libkrb5-3_1.17-6ubuntu4.1_amd64.deb ...
Unpacking libkrb5-3:amd64 (1.17-6ubuntu4.1) ...
Selecting previously unselected package libgssapi-krb5-2:amd64.
Preparing to unpack .../09-libgssapi-krb5-2_1.17-6ubuntu4.1_amd64.deb ...
Unpacking libgssapi-krb5-2:amd64 (1.17-6ubuntu4.1) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../10-libpsl5_0.21.0-1ubuntu1_amd64.deb ...
Unpacking libpsl5:amd64 (0.21.0-1ubuntu1) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../11-publicsuffix_20200303.0012-1_all.deb ...
Unpacking publicsuffix (20200303.0012-1) ...
Selecting previously unselected package libbrotli1:amd64.
Preparing to unpack .../12-libbrotli1_1.0.7-6ubuntu0.1_amd64.deb ...
Unpacking libbrotli1:amd64 (1.0.7-6ubuntu0.1) ...
Selecting previously unselected package libroken18-heimdal:amd64.
Preparing to unpack .../13-libroken18-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ...
Unpacking libroken18-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Selecting previously unselected package libasn1-8-heimdal:amd64.
Preparing to unpack .../14-libasn1-8-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ...
Unpacking libasn1-8-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Selecting previously unselected package libheimbase1-heimdal:amd64.
Preparing to unpack .../15-libheimbase1-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ...
Unpacking libheimbase1-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Selecting previously unselected package libhcrypto4-heimdal:amd64.
Preparing to unpack .../16-libhcrypto4-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ...
Unpacking libhcrypto4-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Selecting previously unselected package libwind0-heimdal:amd64.
Preparing to unpack .../17-libwind0-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ...
Unpacking libwind0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Selecting previously unselected package libhx509-5-heimdal:amd64.
Preparing to unpack .../18-libhx509-5-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ...
Unpacking libhx509-5-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Selecting previously unselected package libkrb5-26-heimdal:amd64.
Preparing to unpack .../19-libkrb5-26-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ...
Unpacking libkrb5-26-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Selecting previously unselected package libheimntlm0-heimdal:amd64.
Preparing to unpack .../20-libheimntlm0-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ...
Unpacking libheimntlm0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Selecting previously unselected package libgssapi3-heimdal:amd64.
Preparing to unpack .../21-libgssapi3-heimdal_7.7.0+dfsg-1ubuntu1_amd64.deb ...
Unpacking libgssapi3-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Selecting previously unselected package libsasl2-modules-db:amd64.
Preparing to unpack .../22-libsasl2-modules-db_2.1.27+dfsg-2_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.27+dfsg-2) ...
Selecting previously unselected package libsasl2-2:amd64.
Preparing to unpack .../23-libsasl2-2_2.1.27+dfsg-2_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.27+dfsg-2) ...
Selecting previously unselected package libldap-common.
Preparing to unpack .../24-libldap-common_2.4.49+dfsg-2ubuntu1.8_all.deb ...
Unpacking libldap-common (2.4.49+dfsg-2ubuntu1.8) ...
Selecting previously unselected package libldap-2.4-2:amd64.
Preparing to unpack .../25-libldap-2.4-2_2.4.49+dfsg-2ubuntu1.8_amd64.deb ...
Unpacking libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1.8) ...
Selecting previously unselected package libnghttp2-14:amd64.
Preparing to unpack .../26-libnghttp2-14_1.40.0-1build1_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.40.0-1build1) ...
Selecting previously unselected package librtmp1:amd64.
Preparing to unpack .../27-librtmp1_2.4+20151223.gitfa8646d.1-2build1_amd64.deb ...
Unpacking librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build1) ...
Selecting previously unselected package libssh-4:amd64.
Preparing to unpack .../28-libssh-4_0.9.3-2ubuntu2.2_amd64.deb ...
Unpacking libssh-4:amd64 (0.9.3-2ubuntu2.2) ...
Selecting previously unselected package libcurl4:amd64.
Preparing to unpack .../29-libcurl4_7.68.0-1ubuntu2.7_amd64.deb ...
Unpacking libcurl4:amd64 (7.68.0-1ubuntu2.7) ...
Selecting previously unselected package curl.
Preparing to unpack .../30-curl_7.68.0-1ubuntu2.7_amd64.deb ...
Unpacking curl (7.68.0-1ubuntu2.7) ...
Selecting previously unselected package libsasl2-modules:amd64.
Preparing to unpack .../31-libsasl2-modules_2.1.27+dfsg-2_amd64.deb ...
Unpacking libsasl2-modules:amd64 (2.1.27+dfsg-2) ...
Setting up libkeyutils1:amd64 (1.6-6ubuntu1) ...
Setting up libpsl5:amd64 (0.21.0-1ubuntu1) ...
Setting up libssl1.1:amd64 (1.1.1f-1ubuntu2.10) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in #INC (you may need to install the Term::ReadLine module) (#INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libbrotli1:amd64 (1.0.7-6ubuntu0.1) ...
Setting up libsqlite3-0:amd64 (3.31.1-4ubuntu0.2) ...
Setting up libsasl2-modules:amd64 (2.1.27+dfsg-2) ...
Setting up libnghttp2-14:amd64 (1.40.0-1build1) ...
Setting up krb5-locales (1.17-6ubuntu4.1) ...
Setting up libldap-common (2.4.49+dfsg-2ubuntu1.8) ...
Setting up libkrb5support0:amd64 (1.17-6ubuntu4.1) ...
Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg-2) ...
Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2build1) ...
Setting up libk5crypto3:amd64 (1.17-6ubuntu4.1) ...
Setting up libsasl2-2:amd64 (2.1.27+dfsg-2) ...
Setting up libroken18-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up libkrb5-3:amd64 (1.17-6ubuntu4.1) ...
Setting up openssl (1.1.1f-1ubuntu2.10) ...
Setting up publicsuffix (20200303.0012-1) ...
Setting up libheimbase1-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up libasn1-8-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up libhcrypto4-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up ca-certificates (20210119~20.04.2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in #INC (you may need to install the Term::ReadLine module) (#INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
128 added, 0 removed; done.
Setting up libwind0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up libgssapi-krb5-2:amd64 (1.17-6ubuntu4.1) ...
Setting up libssh-4:amd64 (0.9.3-2ubuntu2.2) ...
Setting up libhx509-5-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up libkrb5-26-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up libheimntlm0-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up libgssapi3-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1.8) ...
Setting up libcurl4:amd64 (7.68.0-1ubuntu2.7) ...
Setting up curl (7.68.0-1ubuntu2.7) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for ca-certificates (20210119~20.04.2) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
$ su meteor_install
$ echo $0
/usr/bin/bash
$ cd ~
$ ls -alh
total 16K
drwx------ 2 root root 4.0K Oct 6 16:58 .
drwxr-xr-x 1 root root 4.0K Jan 1 12:19 ..
-rw-r--r-- 1 root root 3.1K Dec 5 2019 .bashrc
-rw-r--r-- 1 root root 161 Dec 5 2019 .profile
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15037 100 15037 0 0 157k 0 --:--:-- --:--:-- --:--:-- 157k
=> Downloading nvm as script to '/root/.nvm'
=> Appending nvm source string to /root/.bashrc
=> Appending bash_completion source string to /root/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
$ ls -alh
total 20K
drwx------ 1 root root 4.0K Jan 1 12:20 .
drwxr-xr-x 1 root root 4.0K Jan 1 12:19 ..
-rw-r--r-- 1 root root 3.3K Jan 1 12:20 .bashrc
drwxr-xr-x 2 root root 4.0K Jan 1 12:20 .nvm
-rw-r--r-- 1 root root 161 Dec 5 2019 .profile
$ source ~/.bashrc
$ cat ~/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u#\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u#\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user#host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u#\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
#fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
$ export NVM_DIR="$HOME/.nvm"
$ nvm install 12.13.1
/usr/bin/bash: line 143: nvm: command not found
Cleaning up project directory and file based variables 00:05
ERROR: Job failed: exit code 1
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
should work

install zeppelin with spark in docker-compose

I was trying to install zeppelin as shown in this dockerfile, but with a different version of spark and hadoop (see this dockerfile in my repo for more details). However, I am getting the following error log when running apt-get update:
Step 5/10 : RUN apt-get update
---> Running in 1ee84513acc7
Ign http://ftp.debian.org jessie-backports InRelease
Ign http://ftp.debian.org jessie-backports Release.gpg
Ign http://deb.debian.org jessie InRelease
Ign http://ftp.debian.org jessie-backports Release
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Err http://ftp.debian.org jessie-backports/main amd64 Packages
Get:2 http://deb.debian.org jessie-updates InRelease [16.3 kB]
Err http://ftp.debian.org jessie-backports/main amd64 Packages
Err http://ftp.debian.org jessie-backports/main amd64 Packages
Get:3 http://deb.debian.org jessie Release.gpg [1652 B]
Err http://ftp.debian.org jessie-backports/main amd64 Packages
Get:4 http://deb.debian.org jessie-updates/main amd64 Packages [20 B]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [992 kB]
Err http://ftp.debian.org jessie-backports/main amd64 Packages
404 Not Found
Get:6 http://deb.debian.org jessie Release [77.3 kB]
Get:7 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
W: Size of file /var/lib/apt/lists/deb.debian.org_debian_dists_jessie-updates_main_binary-amd64_Packages.gz is not what the server reported 20 23046
W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Fetched 10.2 MB in 1s (7375 kB/s)
The command '/bin/sh -c apt-get update' returned a non-zero code: 100
ERROR: Service 'zeppelin' failed to build
It seems like this is somehow related to the jessie package. I read this and this article and I tried including
RUN echo "deb [check-valid-until=no] http://cdn-fastly.deb.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update
script before the apt-get update command in the dockerfile of my repo, but still without success.

"apt-get install" stuck when build an image from a Dockerfile

I'm tring to build an image from a Dockerfile, and get stuck when "RUN apt-get install ...", i want to know the reason. May be due to GFW, I don't know.
Another thing confused me is that the output log printed when run in build is different from the log printed when run in a container(i.e. run in "docker container run -it image_name /bin/bash").
Please help me.
I have tried some keywords like "apt-get install stuck", but i didn't find a similar question.
The Dockerfile:
FROM nvidia/cuda:9.0-devel-ubuntu16.04
MAINTAINER avanetten
ENV CUDNN_VERSION 7.3.0.29
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
libcudnn7=$CUDNN_VERSION-1+cuda9.0 \
libcudnn7-dev=$CUDNN_VERSION-1+cuda9.0 && \
apt-mark hold libcudnn7 && \
rm -rf /var/lib/apt/lists/*
I run this:
sudo docker build --no-cache -t testimage .
and i stuck here
Sending build context to Docker daemon 2.043GB
Step 1/37 : FROM nvidia/cuda:9.0-devel-ubuntu16.04
---> 2a64416134d8
Step 2/37 : MAINTAINER avanetten
---> Running in 0a0f4e3bb485
Removing intermediate container 0a0f4e3bb485
---> 23c2cb4ab1ff
Step 3/37 : ENV CUDNN_VERSION 7.3.0.29
---> Running in 41b6be7dc176
Removing intermediate container 41b6be7dc176
---> 65f16199d658
Step 4/37 : LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
---> Running in 0f5e7aece401
Removing intermediate container 0f5e7aece401
---> c41f04004970
Step 5/37 : RUN apt-get update && apt-get install -y --no-install-recommends apt-utils libcudnn7=$CUDNN_VERSION-1+cuda9.0 libcudnn7-dev=$CUDNN_VERSION-1+cuda9.0 && apt-mark hold libcudnn7 && rm -rf /var/lib/apt/lists/*
---> Running in 3a67681d2578
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Ign:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 InRelease
Ign:4 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 InRelease
Get:5 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release [170 B]
Get:6 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Release [170 B]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [940 kB]
Get:8 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release.gpg [170 B]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:10 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Release.gpg [170 B]
Get:11 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages [231 kB]
Get:12 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Packages [54.1 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.7 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [582 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [6114 B]
Get:19 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1322 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [986 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [19.1 kB]
Get:25 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [7942 B]
Get:26 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [8807 B]
Fetched 16.3 MB in 28s (570 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libapt-inst2.0
The following NEW packages will be installed:
apt-utils libapt-inst2.0 libcudnn7 libcudnn7-dev
0 upgraded, 4 newly installed, 0 to remove and 13 not upgraded.
Need to get 242 MB of archives.
After this operation, 598 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapt-inst2.0 amd64 1.2.32 [55.8 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt-utils amd64 1.2.32 [196 kB]
Get:3 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 libcudnn7 7.3.0.29-1+cuda9.0 [126 MB]
^C
I can not see progress or rate from the log, then I delete the RUN part and finished image build and tried
docker container run --rm -it testimage /bin/bash
, and when the container is running, I run this:
apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
libcudnn7=$CUDNN_VERSION-1+cuda9.0 \
libcudnn7-dev=$CUDNN_VERSION-1+cuda9.0 && \
apt-mark hold libcudnn7 && \
rm -rf /var/lib/apt/lists/*
, it works,the log is
root#74ce912f6318:/# apt-get update && apt-get install -y --no-install-recommends \
> apt-utils \
> libcudnn7=$CUDNN_VERSION-1+cuda9.0 \
> libcudnn7-dev=$CUDNN_VERSION-1+cuda9.0 && \
> apt-mark hold libcudnn7 && \
> rm -rf /var/lib/apt/lists/*
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Ign:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 InRelease
Ign:5 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 InRelease
Get:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:7 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release [170 B]
Get:8 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:9 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Release [170 B]
Get:10 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release.gpg [170 B]
Get:11 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Release.gpg [170 B]
Get:12 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages [231 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:14 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Packages [54.1 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1322 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [940 kB]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.7 kB]
Get:20 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [582 kB]
Get:21 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [6114 B]
Ign:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [986 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [19.1 kB]
Get:25 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [7942 B]
Get:26 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [8807 B]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.1 kB]
Fetched 16.3 MB in 39s (409 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libapt-inst2.0
The following NEW packages will be installed:
apt-utils libapt-inst2.0 libcudnn7 libcudnn7-dev
0 upgraded, 4 newly installed, 0 to remove and 13 not upgraded.
Need to get 242 MB of archives.
After this operation, 598 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapt-inst2.0 amd64 1.2.32 [55.8 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt-utils amd64 1.2.32 [196 kB]
Get:3 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 libcudnn7 7.3.0.29-1+cuda9.0 [126 MB]
31% [3 libcudnn7 63.8 MB/170 B 37523776%] 8995 kB/s 19s^C
This time, I can see the progress(i.e. 31%), I stop it myself with ctrl-c.
I have two expectations, first is to make the Dockerfile work, second is to see the progress. Thanks.

A docker image based on "php:5.6.32-apache" fails to build when running "RUN apt-get update -y"

I want to build a docker image based on php:5.6.32-apache.
The content involved in this within my Dockerfile is:
FROM php:5.6.32-apache
....
RUN apt-get update -y
The console output from the built process is:
Step 6/10 : RUN apt-get update -y
---> Running in 8781a7a005ad
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [7340 B]
Get:3 http://deb.debian.org jessie Release.gpg [2420 B]
Get:4 http://deb.debian.org jessie Release [148 kB]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [846 kB]
Get:6 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
Fetched 10.1 MB in 17s (565 kB/s)
ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update -y' returned a non-zero code: 100
You can find the original php:5.6.32-apache Dockerfile here:
https://github.com/docker-library/php/blob/ec6b6e60b42c283d48775596f722f5250c1f5ca5/5.6/jessie/apache/Dockerfile
Duplicate. Please find solution at:
Build Error. Failed to fetch Build Error. Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages

Resources