繁体   English   中英

Docker 容器与 ubuntu 16.04 add-apt-repository 使用 groovy 而不是 xenial

[英]Docker container with ubuntu 16.04 add-apt-repository using groovy instead of xenial

在我的 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

这是错误 output:

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 图像。 您可以尝试以下方法之一:

  1. 使用node:12.18.1作为您的基础镜像,但使用基于 Debian 之类的可能满足您的要求的镜像。
  2. 使用ubuntu:16.04作为您的基本映像,并在其中安装 Node.js使用类似的东西:
     curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt-get install -y nodejs

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM