Docker Notes Personal
Dockerfile
when you run an docker image, an instance is created, that is called as Docker Container
commands :
docker
docker pull image_name
docker run image_name
How to Create your own Docker image?
1. complete your python code, let's say app.py
2. make requirements.txt
3. Create 1 dockerfile in your project folder
It is compulsory to add 0.0.0.0 as host address, so that you can run it outside the docker as well
dockerhub username / the image name of your choice
8888 your port
5000 flask app port inside docker
Finally, push it on docker hub
Comments
Post a Comment