简体   繁体   中英

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

I have a problem when adding a ppa repository in my docker container. My ubuntu version in the container is 16.04 that supposed to be xenial , but when I added a ppa repository using add-apt-repository it's using groovy . The problem is, bitcoin ppa repository isn't available yet on groovy release. How to fix this problem?

Here my 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

This is the errors 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

The problem is in your Dockerfile :

FROM ubuntu:16.04
FROM node:12.18.1

The second FROM command overwrites the first.

I can't seem to find a Node.js image based off of Xenial. You can try one the following methods:

  1. Use node:12.18.1 as your base image, but use one based off of something like Debian which might meet your requirements.
  2. Use ubuntu:16.04 as your base image, and install Node.js in it using something like:
     curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt-get install -y nodejs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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