FlareXes
FlareXes

FlareXes

Parrot OS Weird Docker Installation Issues

Docker And LibraWolf Installation In Parrot OS

FlareXes's photo
FlareXes
·Jul 12, 2022·

4 min read

Parrot OS Weird Docker Installation Issues

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Parrot OS is a privacy-focused penetration testing operating system. Which comes bundled with many pentesting or hacking tools. But, sometimes we need to install something else like Docker. Which prompts a weird issue. Something like that.

E: The repository 'https://download.docker.com/linux/debian ara Release' does not have a Release file.
N: Updating from such a repository can't be done securely and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

If you are getting such an error, Then this is probably an issue of VERSION_CODENAME. So, Let's resolve this now!

Docker Installation On Parrot OS

Step 1: Update the package index and install required dependencies.

sudo apt update
sudo apt install ca-certificates curl gnupg lsb-release

Step 2: Add Docker Official GPG Key.

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

Note: It's always recommended to perform Step 2 from the Docker official site because sometimes (rarely) gets changed. Check from here

Step 3: Setup The Docker Repository (The Problem ☠️)

echo \
 "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
 $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Now, If you try to update your system now, it wouldn't work. And you have an error like below.

E: The repository 'https://download.docker.com/linux/debian ara Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Step 4: Resolve The Issues

Open The File /etc/apt/sources.list.d/docker.list.

sudo vim /etc/apt/sources.list.d/docker.list

And, replace ara (Second last word) with bullseye. Something like that.

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bullseye stable

bullseye is the codename for Debian 11. If you're using any other version of Debian like 10 or 9 then use their codename Buster or Stretch respectively.

Step 5: Install Docker Engine

Now, the Error may have gone. So we can install Docker. Before that update the apt package index.

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Receiving a GPG error when running apt-get update?

Then Run the following command, sudo chmod a+r /etc/apt/keyrings/docker.gpg

That's all. Docker is installed on your system.

In Short Docker Installation

sudo apt update

sudo apt install ca-certificates curl gnupg lsb-release

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo \
 "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
 $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Now, Open /etc/apt/sources.list.d/docker.list and replace ara with bullseye (For Debian 11).

┌─[[email protected]]─[~]
└──╼ $cat /etc/apt/sources.list.d/docker.list

# Replacing
# deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian ara stable
# With

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bullseye stable

Then, just update and install.

sudo apt update

sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Issues Explanation

If you look at the Step 3 command closely. Then you'll see that it's actually trying to get your Operating System codename using lsb_release -cs. A Codename refers to the nickname of the current version of your OS. In this case of Parrot OS, you'll see that it's ara because Parrot isn't a Debian Operating System it is based on Debian 11. And, the Docker installation guide is about Debian OS, not Debian-based OS. So, you have to struggle a bit.

One More Example, LibraWolf Web-browser

LibreWolf is a fork of Firefox, focused on privacy, security and freedom (One Of My Favourite Browser). Here you'll also see the same issues. I'm showing you that because application syntax varies for each case. For example, LibraWolf uses the if-else condition to find your OS version or codename. Let's see how it works.

Step 1: Find distro codename and stdout.

distro=$(if echo " bullseye focal impish jammy uma una " | grep -q " $(lsb_release -sc) "; then echo $(lsb_release -sc); else echo focal; fi)
echo $distro

If you run the above command on Parrot OS will return ara. Which is wrong, it should be bullseye. For that revise Step 1 again.

Step 1 (revised): Add distro codename manually.

export distro="bullseye"

Step 2: All Set, add and install the LibraWolf accordingly.

echo "deb [arch=amd64] http://deb.librewolf.net $distro main" | sudo tee /etc/apt/sources.list.d/librewolf.list

sudo wget https://deb.librewolf.net/keyring.gpg -O /etc/apt/trusted.gpg.d/librewolf.gpg

sudo apt update

sudo apt install librewolf -y

So, these tiny issues can happen and waste a few hours of your life. In the past, this did waste my time. Hopefully, didn't happen to you (waste of time 😅). That's it for today. Programming always helps. Goodbye!