Last active
June 15, 2018 15:58
-
-
Save vpack/ae0f735a104b96763793 to your computer and use it in GitHub Desktop.
Docker Quick Install
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
yum -y install epel-release | |
yum -y install docker | |
systemctl enable docker | |
systemctl start docker | |
curl -L https://github.com/docker/machine/releases/download/v0.5.0/docker-machine_linux-amd64.zip >machine.zip | |
unzip machine.zip | |
rm machine.zip | |
mv docker-machine* /usr/local/bin | |
# Docker Jenkins | |
ssh ip-10-44-151-123.ec2.internal | |
docker images | |
git clone https://github.com/jenkinsci/docker.git | |
docker rmi vpack:jenkin # Remove Image | |
docker build -t vpack:jenkins . | |
vi docker-compose.yml | |
# Docker Compose | |
docker-compose build | |
docker-compose up -d | |
docker-compose run web /usr/local/bin/python create_db.py | |
docker-compose run web env | |
docker-compose logs | |
psql -h 192.168.99.100 -p 5432 -U postgres --password | |
# Docker Compose using Cloud Provider | |
docker-machine create -d digitalocean --digitalocean-access-token=ADD_YOUR_TOKEN_HERE production | |
Reference: | |
- https://realpython.com/blog/python/dockerizing-flask-with-compose-and-machine-from-localhost-to-the-cloud/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment