We can find and pull images using docker hub. It is the default image registry managed by the Docker.
We will use a simple python app to build a docker container.
- Change directory into
step1/ - Build a docker container image.
docker build -t workshop:step1 . - Run the container image.
docker run -p 5000:5000 workshop:step1
- Open the web page in browser: http://127.0.0.1:5000
What if we need more containers?
- Change directory into
step2/ - Build and run the containers using docker compose
docker compose up --build
- Open the web page in browser: http://127.0.0.1:5000