This quick start was modified from:
- From the root folder
fastapi
, run
docker-compose up -d --build
- List the containers
docker ps
Output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
59329b5986a4 fastapi_api "/start.sh" About a minute ago Up About a minute 80/tcp, 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp fastapi-application
- Navigate to http://localhost:8000 in the web browser to find the following json response:
{
"message": "OK"
}
- Stop and remove all running containers:
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
- To forcefully remove all Docker images
docker rmi --force $(docker images -q)
- Remove all Docker volumes:
docker volume prune