A curated list of dockerfiles and docker-compose files to be used as reference for popular programming languages (e.g: golang, nodejs, python).
- Dockerfile for FastAPI in production environment
- Dockerfile for FastAPI in development environment
- docker-compose for FastAPI in development environment
# basic commands
docker login
docker build . -t my-user/my-app:latest
docker run -p 8080:80 my-user/my-app:latest
docker push my-user/my-app:latest
docker ps
docker ps -a
docker run hello-world
docker run -it ubuntu bash
docker run -it --rm ubuntu bash
docker run -it --rm -d -p 8081:80 nginx
docker container stop $container_id_one $container_id_two
docker container rm $container_id
docker logs -f $container_id
docker exec -it nginx bash
# clean up
docker system df
docker system prune
docker volume prune
docker rm $(docker ps -a -q) -f
docker compose up --build
docker compose up --build my-specific-service
docker compose up --build --force-recreate --remove-orphans