📝 Added notation regarding basics of docker

This commit is contained in:
z3rOR0ne 2022-06-29 02:55:30 -07:00
parent 6d3ee91383
commit 4571cabb15
3 changed files with 84 additions and 0 deletions

26
docker_nginx_basics.txt Normal file
View file

@ -0,0 +1,26 @@
https://www.howtogeek.com/devops/what-does-docker-do-and-when-should-you-use-it/
mkdir ~/dockertest && cd ~/dockertest
echo -e "FROM nginx/nCOPY html /usr/share/nginx/html"
mkdir html && touch html/index.html
In index.html, write:
<!DOCTYPE html>
<html>
<body>
Hello From nginx, inside Docker! Inside, your computer?
</body>
</html>
In dockertest directory:
docker build -t dockertest .
And finally:
docker run --name DockerTest -p 8080:80 -d dockertest
In a browser, go to localhost:8080, and you should see your index.html file rendered.