-1

I have a Dockerfile in which I want to install ffmpeg on my machine. However, the Dockerfile always ends with the following error:

Sending build context to Docker daemon  3.371GB
Step 1/22 : FROM nvcr.io/nvidia/deepstream:6.0.1-devel
 ---> b8179aaa2d73
Step 2/22 : RUN apt-get update && apt-get upgrade -y
 ---> Running in 57df65265677
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease
  Could not resolve 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease              
  Could not resolve 'security.ubuntu.com'
Err:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease
  Could not resolve 'developer.download.nvidia.com'
Err:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                
  Could not resolve 'archive.ubuntu.com'
Err:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Could not resolve 'security.ubuntu.com'
W: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/InRelease  Could not resolve 'developer.download.nvidia.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  cuda-libraries-11-4 cuda-libraries-dev-11-4 libcublas-11-4
  libcublas-dev-11-4 libnccl-dev libnccl2 libnvinfer-dev libnvinfer-plugin-dev
  libnvinfer-plugin8 libnvinfer8 libnvonnxparsers-dev libnvonnxparsers8
  libnvparsers-dev libnvparsers8 python3-libnvinfer python3-libnvinfer-dev
The following packages will be upgraded:
  base-files ca-certificates cuda-command-line-tools-11-4 cuda-compat-11-4
  cuda-compiler-11-4 cuda-cudart-11-4 cuda-cudart-dev-11-4
2 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
Need to get 1325 MB of archives.
After this operation, 51.2 MB disk space will be freed.
Err:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  cuda-nvdisasm-11-4 11.4.152-1
  Could not resolve 'developer.download.nvidia.com'
Err:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  cuda-nvtx-11-4 11.4.120-1
  Could not resolve 'developer.download.nvidia.com'
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/b/base-files/base-files_10.1ubuntu2.11_amd64.deb  Could not resolve 'archive.ubuntu.com'
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/s/shadow/login_4.5-1ubuntu2.2_amd64.deb  Could not resolve 'archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get update && apt-get upgrade -y' returned a non-zero code: 100

I already tried searching for the error but couldn't find a good solution. The Dockerfile looks like this:

FROM nvcr.io/nvidia/deepstream:6.0.1-devel

#Set environment variables
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get upgrade -y
RUN apt-get install ffmpeg -y

Does someone have an idea where the error could be? It seems like the code has a problem with the "nointerarctive" env variable. Because he does everything right until he needs to upgrade the packages.

jfst
  • 1
  • 3
  • Take a look here https://medium.com/@faithfulanere/solved-docker-build-could-not-resolve-archive-ubuntu-com-apt-get-fails-to-install-anything-9ea4dfdcdcf2 – rok Nov 21 '22 at 10:39

1 Answers1

0

Have you tried to change

ENV DEBIAN_FRONTEND noninteractive

to

ENV DEBIAN_FRONTEND=noninteractive

Also, have a read about this here Why is DEBIAN_FRONTEND=noninteractive discouraged in Docker files?

Want2bExpert
  • 527
  • 4
  • 11
  • 1
    Unfortunately, this didn't solve the issue. But thanks for the link, interesting! – jfst Nov 15 '22 at 12:06