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 updateThis 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 - More info:
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 stretch/updates InRelease [94.3 kB]
Ign:2 stretch InRelease
Get:3 stretch-updates InRelease [93.6 kB]
Get:4 stretch Release [118 kB]
Get:5 stretch/updates/main amd64 Packages [529 kB]
Get:6 stretch-updates/main amd64 Packages [28.2 kB]
Get:7 stretch Release.gpg [2410 B]
Get:8 stretch/main amd64 Packages [7083 kB]
Ign:9 groovy InRelease
Err:10 groovy Release 404 Not Found
Reading package lists...
E: The repository ' groovy Release' does not have a Release file.
The command '/bin/sh -c apt update' returned a non-zero code: 100 4 2 Answers
According to node - Docker Hub,
... Some of these tags may have names like buster, jessie, or stretch in them. These are the suite code names for releases of Debian and indicate which release the image is based on.
So you're actually running Node on top of Debian not Ubuntu. You can confirm that by running sudo docker run -it node:12.18.1 /bin/bash and then cat /etc/os-release.
The repositories and packages you were trying to install were actually installed in Debian since RUN instructions were written immediately after FROM node:12.18.1. To run add the repository in Ubuntu image, shift the RUN instructions beneath FROM ubuntu:16.04, i.e.,
FROM ubuntu:16.04
RUN apt update && apt dist-upgrade -y
RUN apt install software-properties-common -y
RUN add-apt-repository ppa:bitcoin/bitcoin
RUN apt update
FROM node:12.18.1Related Documentation: Dockerfile reference | Docker Documentation
Although not related specifically to Docker or ubuntu PPAs or the weird debian repositories in your apt update output from ubuntu 16.04 , you can download the Distro-independent version from the bitcoincore.org website.For example you can do this in your docker container :
wget
gunzip bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
tar xvf bitcoin-0.20.0-x86_64-linux-gnu.tar
cd bitcoin-0.20.0/bin
./bitcoin-cli "whatever-argument"