我有一个Dockerfile文件,我想在机器上安装ffmpeg。但是,Dockerfile始终以以下错误结尾:
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
我已经试着寻找错误,但没有找到一个好的解决方案。Dockerfile如下所示:
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
有人知道错误可能在哪里吗?代码似乎与"nointerarctive“env变量有问题。因为他把一切都做对了,直到他需要升级软件包。
发布于 2022-11-15 11:39:45
你有没有试过改变
ENV DEBIAN_FRONTEND noninteractive
至
ENV DEBIAN_FRONTEND=noninteractive
另外,在这里阅读一下在码头文件中不鼓励FRONTEND=noninteractive?
https://stackoverflow.com/questions/74444713
复制相似问题