Created
September 20, 2016 10:31
-
-
Save yanniboi/fbade5e4faa00a202877e9a899df180f to your computer and use it in GitHub Desktop.
Docker command cheatsheet
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 | |
# Get docker image. | |
docker pull yanniboi/ubuntu-php | |
cd yanniboi-php | |
# Start a new container | |
docker run -it --name mycontainer1 yanniboi/ubuntu-php | |
# Make changes | |
# exit - to finish | |
# docker run mycontainer1 - if you need to get back | |
# Commit changes to docker image | |
docker commit mycontainer1 yanniboi/ubuntu-php | |
# Push changes to head. | |
docker push yanniboi/ubuntu-php | |
# Remove container when finished | |
docker rm mycontainer1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment