Forked from UbuntuEvangelist/Docker and Docker Compose Install
Last active
April 21, 2021 09:33
-
-
Save LinauxTerminology/fd53d089f1de72fac2910732dc9f69a3 to your computer and use it in GitHub Desktop.
I Will Do Docker and Docker Compose Install ubuntu 20.04 LTS
This file contains hidden or 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
If you need Docker & Docker Compose Setup contact with me: | |
Email: [email protected] | |
Skype: https://join.skype.com/ | |
Telegram: https://t.me/LinauxTerminology | |
WhatsApp: +8801408694088 | |
Imo: +8801408694088 | |
twiteer:https://twitter.com/LinauxTerminoal | |
facebook:https://www.facebook.com/LinauxTerminology | |
bip:01314582960 | |
instagram:[email protected] | |
#!/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 "masum" | |
git config --global user.email [email protected] | |
apt upgrade -y | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
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 - | |
add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
apt-get update -y | |
apt install docker-ce -y | |
systemctl start docker | |
systemctl enable docker | |
usermod -aG docker ${USER} | |
systemctl restart docker | |
systemctl status docker | |
docker --version | |
# Docker Compose Install | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/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 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) |
Author
LinauxTerminology
commented
Apr 21, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment