Created
July 31, 2022 16:08
-
-
Save gigsforlinux/11c9def0ea856da96c3aa561233aa53d to your computer and use it in GitHub Desktop.
I'll Do Anything Goes With Docker,Docker-Compose For You
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
apt update -y | |
apt-get upgrade -y | |
apt install build-essential checkinstall | |
apt install ubuntu-restricted-extras | |
apt install software-properties-common | |
apt upgrade -o APT::Get::Show-Upgraded=true | |
apt-show-versions | grep upgradeable | |
apt install apt-show-versions | |
apt update -y | |
apt-get upgrade -y | |
add-apt-repository ppa:nilarimogard/webupd8 | |
apt update -y | |
apt install launchpad-getkeys | |
launchpad-getkeys | |
add-apt-repository ppa:git-core/ppa | |
apt update -y | |
apt install git | |
git config --global user.name "gigsforlinux" | |
git config --global user.email mail@domain.com | |
apt upgrade -y | |
ssh-keygen -t rsa -b 4096 -C "your_email@example.com" | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_rsa | |
cat /root/.ssh/id_rsa.pub | |
# add your KEY to github and gitlab SSH | |
####### Enable SSH ######## | |
apt-get install openssh-server | |
nano /etc/ssh/sshd_config | |
# Find (ctrl+w) this line and set | |
PermitRootLogin yes | |
PubkeyAuthentication yes | |
PasswordAuthentication yes | |
# Save & exit ctrl+s and ctrl+x then hit enter | |
service ssh restart | |
apt -f install | |
apt autoremove | |
apt -y autoclean | |
apt -y clean | |
apt update | |
reboot | |
# Docker Install | |
apt-get update -y | |
apt-get upgrade -y | |
apt-get install apt-transport-https ca-certificates curl software-properties-common -y | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
apt-get update -y | |
apt install docker-ce -y | |
systemctl start docker | |
systemctl enable docker | |
systemctl restart docker | |
systemctl status docker | |
docker --version | |
# Docker Compose Install | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
OR | |
sudo curl -L "https://github.com/docker/compose/releases/download/2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose | |
apt-get update -y | |
apt-get upgrade -y | |
docker compose --version | |
# Docker with noVNC, gr-gsm, wireshark, kalibrate-rtl pre-installed. | |
# ADD YOUR SSK KEY AT GITHUB | |
git clone git@github.com:SchoolOfFreelancing/gsm-sniffing-docker.git | |
cd gsm-sniffing-docker | |
git init | |
git add . | |
git commit -am "first-commit" | |
git pull | |
git push | |
docker run -i -t -d \ | |
--name GSM \ | |
--restart always \ | |
-p 5900:5900 \ | |
-p 6080:6080 \ | |
--device /dev/bus/usb \ | |
-e VNC_PASSWD="168168" \ | |
-e GEOMETRY="1280x720" \ | |
-e DEPTH=32 \ | |
bclswl0827/gsm-sniffing-docker:latest | |
# Visit from web browser and use this password 168168 | |
0.0.0.0:5900 | |
0.0.0.0:6080 | |
###########Docker Image Stop and Delete########################### | |
List all containers (only IDs) | |
$ docker ps -aq | |
Stop all running containers. | |
$ docker stop $(docker ps -aq) | |
Remove all containers. | |
$ docker rm $(docker ps -aq) | |
Remove all images. | |
$ docker rmi $(docker images -q) | |
Source: https://github.com/SchoolOfFreelancing/gsm-sniffing-docker |
Author
gigsforlinux
commented
Jul 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment