linux - 带有 ubuntu 16.04 add-apt-repository 的 Docker 容器使用 groovy 而不是 xenial

标签 linux docker ubuntu

在我的 docker 容器中添加 ppa 存储库时遇到问题。
我在容器中的 ubuntu 版本是 16.04,应该是 xenial ,但是当我使用 add-apt-repository 添加 ppa 存储库时它正在使用 groovy .问题是,groovy 上还没有比特币 ppa 存储库。发布。
如何解决这个问题?
这是我的 Dockerfile

FROM ubuntu:16.04
FROM node:12.18.1

RUN apt update && apt dist-upgrade -y
RUN apt install software-properties-common -y
RUN add-apt-repository ppa:bitcoin/bitcoin
RUN apt update
这是错误输出:
Step 5/19 : RUN add-apt-repository ppa:bitcoin/bitcoin
 ---> Running in af0bb3a110cf
 NOT MAINTAINED. The OS-library linking packages here had a series of issues.

PLEASE DOWNLOAD DIRECTLY FROM bitcoincore.org (and verify the signatures of said files).

IF YOU WANT AUTO-UPDATES, please see the officially-maintained snap package -
https://github.com/bitcoin-core/packaging/tree/master/snap
 More info: https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin
gpg: keybox '/tmp/tmpq1hxj8km/pubring.gpg' created
gpg: key D46F45428842CE5E: 3 signatures not checked due to missing keys
gpg: /tmp/tmpq1hxj8km/trustdb.gpg: trustdb created
gpg: key D46F45428842CE5E: public key "Launchpad PPA for Bitcoin" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
Removing intermediate container af0bb3a110cf
 ---> 2949a066b51f
Step 6/19 : RUN apt update
 ---> Running in 2a3109f824ca

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://deb.debian.org/debian stretch InRelease
Get:3 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [529 kB]
Get:6 http://deb.debian.org/debian stretch-updates/main amd64 Packages [28.2 kB]
Get:7 http://deb.debian.org/debian stretch Release.gpg [2410 B]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7083 kB]
Ign:9 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu groovy InRelease
Err:10 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu groovy Release
  404  Not Found
Reading package lists...
E: The repository 'http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu groovy Release' does not have a Release file.
The command '/bin/sh -c apt update' returned a non-zero code: 100

最佳答案

问题出在您的 Dockerfile :

FROM ubuntu:16.04
FROM node:12.18.1
第二个FROM命令覆盖第一个。
我似乎找不到基于 Xenial 的 Node.js 图像。您可以尝试以下方法之一:
  • 使用node:12.18.1作为您的基础镜像,但使用基于 Debian 之类的可能满足您要求的镜像。
  • 使用ubuntu:16.04作为你的基础镜像,install Node.js在其中使用类似的东西:
    curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
  • 关于linux - 带有 ubuntu 16.04 add-apt-repository 的 Docker 容器使用 groovy 而不是 xenial,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62547451/

    相关文章:

    linux - 不允许在 bash 脚本的 getopts 中使用多个选项

    docker - 如何对失败的Docker任务进行故障排除

    postgresql - 如何在 ubuntu 12.04LTS Precise 上的 postgresql-9.3 上添加 pgrouting

    c++ - XSendEvent 不工作

    linux - 运行脚本未在 EC2 上显示

    linux - System.map文件中address的含义

    linux - 编写一个中止挂起程序的启动程序

    linux - 在 linux 脚本中访问在 docker 容器中运行的 mongo shell

    amazon-web-services - AWS 代码构建 | docker |无法拉取客户的容器镜像 |基于 Windows 版本 10.0.17763 的镜像与 10.0.14393 主机不兼容

    php - 如何在 netbeans 的 ubuntu 16.04 中安装 xdebug?