Skip to content

Instantly share code, notes, and snippets.

@nuga99
Last active April 29, 2024 19:18
Show Gist options
  • Star 81 You must be signed in to star a gist
  • Fork 36 You must be signed in to fork a gist
  • Save nuga99/dd5ac250b4c98154b5065d8affec7b49 to your computer and use it in GitHub Desktop.
Save nuga99/dd5ac250b4c98154b5065d8affec7b49 to your computer and use it in GitHub Desktop.
Install Docker Engine on Parrot OS (2023)
#!/bin/sh
# From https://www.hiroom2.com/2017/09/24/parrotsec-3-8-docker-engine-en/
# Changelog:
# @DavoedM: Apr 3, 2020
# @C922A10971734: Jan 19, 2023
set -e
# Install dependencies.
sudo apt install -y curl apt-transport-https \
software-properties-common ca-certificates
# Grab OS Codename
CODENAME=$(lsb_release --codename | cut -f2)
# Install docker.
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
echo "deb [arch=amd64] https://download.docker.com/linux/debian $CODENAME stable" | \
sudo tee /etc/apt/sources.list.d/docker-engine.list
sudo apt-get update -y
sudo apt-get install -y docker-ce
# Run docker.
sudo systemctl start docker
sudo systemctl enable docker
# Add user to docker group for using docker without sudo command.
sudo gpasswd -a "${USER}" docker
# Reboot
sudo reboot
@J7a4s0m5ine
Copy link

J7a4s0m5ine commented Jul 29, 2023

@nuga99

To fix the above original script (the one in this gist), I have formalized a simpler solution than my new project above with the interactive installer.

Realistically we can just keep key/value pairs in a bash associative array that relate Parrot Codenames to Debian Codenames. My above solution will eventually be brought into a different direction which will include much more than docker.

Basically

distribution_mappings=( ["ara"]="bullseye" ["ara2"]="bookworm") and so on 

This will have to be manually updated overtime, but seems like the simplest approach.

@Subhodip1307
Copy link

getting this error please some one help me "
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20210119).
curl is already the newest version (7.88.1-10+deb12u3~bpo11+1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
software-properties-common : Depends: python3-software-properties (= 0.96.20.2-2.1) but it is not installable
Recommends: packagekit but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
"

@tchoumi313
Copy link

E: The repository 'https://download.docker.com/linux/debian n/a Release' does not have a Release file.

n/a means there is not spesific release for Parrot, so you need to add debain spesific like "stretch" for example

work with

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg


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

Thanks man, this works perfectly

@User-DK
Copy link

User-DK commented Apr 17, 2024

@J7a4s0m5ine thanks your script works smoothly

@indexupdate350
Copy link

@indexupdate350
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment