#Docker 🐳 – Add an external repository to the Source List, and add the key from the external server 🤷‍♂️

Hi !

Ok, here goes nothing. And this is mostly so I can avoid to learn again how to do this in the future.

I needed to install a package in my docker Linux file, and I realized that I needed to add a specific source to the debian source list before. After this, I run an apt-get update command and I found that there was a issue with the keys.

GPG error: http://www.elbrunostuff.com/tools sid InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E50DDB1FDER26384

Important: this is for a Debian base scenario. In Ubuntu I realized is easier.

So, in order to add the key, I needed to add these lines to my docker file.

  • Line 1, add the external repository to the source list
  • Line 2, add the key from the external key server
  • Line 3, update
  • Line 4 install !
RUN echo "deb http://www.elbrunostuff.com/tools sid main" > /etc/apt/sources.list
RUN apt-key adv --keyserverkeyserver. elbrunostuff.com --recv-keys E50DDB1FDER26384
RUN apt-get update 
RUN apt-get install -y elbruno-gattlibstuff

I know, Linux experts may type this in 10 minutes. I took me all morning 😂

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.



¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: