Last active
August 9, 2017 09:07
-
-
Save jeongukjae/3f85a5149a8c108eb45401adb4121f4f to your computer and use it in GitHub Desktop.
install docker io, start docker containers, and remove docker containers and images
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/bash | |
# initiate | |
# docker | |
sudo wget -qO- https://get.docker.com/ | sh | |
sudo docker rm `sudo docker ps -aq` | |
sudo docker rmi hello-world | |
sudo systemctl enable docker.service | |
sudo systemctl start docker.service | |
# docker compose | |
sudo yum install epel-release | |
sudo yum install -y python-pip | |
sudo pip install docker-compose | |
sudo yum upgrade python* |
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/bash | |
# install dependencies | |
sudo apt-get -qq update --fix-missing; | |
sudo apt-get -qq upgrade --assume-yes; | |
sudo apt-get -qq install docker.io docker-compose; | |
sudo service docker start; |
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/bash | |
# start server | |
sudo docker-compose up --build -d |
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/bash | |
# stop server | |
sudo docker stop $(sudo docker ps -aq); | |
sudo docker rm $(sudo docker ps -aq); | |
sudo docker rmi $(sudo docker images -aq); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment