Skip to content

Instantly share code, notes, and snippets.

@ludndev
Created June 20, 2020 21:31
Show Gist options
  • Save ludndev/b4132cf1fab047c4711a1bab6aaf57bb to your computer and use it in GitHub Desktop.
Save ludndev/b4132cf1fab047c4711a1bab6aaf57bb to your computer and use it in GitHub Desktop.
docker notes
# 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