Created
June 20, 2020 21:31
-
-
Save ludndev/b4132cf1fab047c4711a1bab6aaf57bb to your computer and use it in GitHub Desktop.
docker notes
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
# create docker image | |
docker build -t webserver:latest . | |
# run it | |
docker run -itd webserver:latest --name container_name | |
# list running proccess | |
docker ps | |
# show grep | |
docker inspect object_names_here | grep IP | |
# run & expose | |
docker run -itd -p 8000:80 webserver:latest --name container_name | |
# stop container | |
docker stop container_id | |
# docker re-run from stop container ( get list from : docker ps -a : ) | |
??? | |
# ssh into container | |
docker exec -it container_id /bin/bash | |
service apache2 restart | |
ed 's/vermin/pony/g' metamorphosis.txt > ponymorphosis.txt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment