Skip to content

Latest commit

 

History

History
74 lines (57 loc) · 1.72 KB

3-docker-usefull-commands.md

File metadata and controls

74 lines (57 loc) · 1.72 KB

Docker Logo


Index



Run containers

  • Use --build to rebuild images when you launch project
docker compose up --build
  • Use --force-recreate to force recreate image and containers
docker compose up --force-recreate
  • Launch in detach mode, you will not see containers log directly in your terminal
docker compose up -d

Reach application

  • localhost:8080 to reach frontend container
  • localhost:5050 to reach pgadmin
  • localhost:3080 to reach backend container
  • localhost:3080/users to reach users table inside our database

Build image with compose

  • If you want to rebuild images using compose
  • You can use --no-cache with it to build without using cache
docker compose build

Stop containers related to compose

docker compose down

Clean up environment

  • Clean containers and images not in use
docker system prune
  • Remove all volumes
docker volume rm $(docker volume ls -q)

Explore container

docker exec -ti [CONTAINER_NAME] sh