-
-
Save nuga99/dd5ac250b4c98154b5065d8affec7b49 to your computer and use it in GitHub Desktop.
#!/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 |
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.
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.
"
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
@J7a4s0m5ine thanks your script works smoothly
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es01.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es02.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es03.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es04.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es05.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es06.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es07.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es08.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es09.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es01.html?iu9
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es02.html?oph
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es03.html?9ui
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es04.html?5h
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es05.html?vhf
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es06.html?fts
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es07.html?65fh
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es08.html?vrt
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es09.html?vy
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es01.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es02.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es03.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es04.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es05.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es06.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es07.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es08.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es09.html
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es01.html?iu9
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es02.html?oph
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es03.html?9ui
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es04.html?5h
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es05.html?vhf
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es06.html?fts
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es07.html?65fh
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es08.html?vrt
https://sla.gov.eg/cbs/video/video-bayern-munich-real-madrid-en-vivo-es09.html?vy
EDIT:
Everything I talk about below has been moved to an official repo to track issues/contributions.
https://github.com/J7a4s0m5ine/docker-debian-installer
@nuga99 and others:
Here's my latest attempt at this problem. Definitely not my proudest work, I'm very rusty in bash apparently. It now provides an interactive install experience that guides the user through choosing distribution, build, and architecture. So it should cover everyone's cases of being able to install easily. Unfortunately like I mentioned before, build names between ParrotOS and Debian will no longer match. So it will require some intuition or research on the user's side. Albeit, this stops any crazy erroneous possibilities with finding a release name and the like during script runtime.
Everything is data-dynamic, all choices are pulled directly from docker's directory browser, so any future choices available will automatically populate in the menu choices. Nothing is hardcoded except for window size, errors, and contributions. There are checks and faults for unsupported distros as well as platforms that don't provide debs/source and only have static assets.
I've automated the testing to this across every version of ParrotOS and every other Debian based OS. There are ways this script can screw up an install. For example using Parrot v5.3 and choosing Debian Bookworm stable amd64 will put you in a situation where containerd and other dependencies cannot be installed because the subsequent dependencies for those requirements are incompatible. Someday down the line I'll provide checks/fixes for this but its outside the purview of what I want to accomplish for now; I have a ton of other projects to be working on.
From space with 💕,
C9
USAGE
Simply run the command to download and run with bash:
Things to fix and or provide as new features:
Screenshots
Distro Selection
Build Selection
Arch Selection
Installation Confirmation
Reboot Confirmation