Skip to content

Instantly share code, notes, and snippets.

@Makistos
Last active June 14, 2023 10:10
Show Gist options
  • Save Makistos/0cb515fe67d9b22ceddc6a5153df8a91 to your computer and use it in GitHub Desktop.
Save Makistos/0cb515fe67d9b22ceddc6a5153df8a91 to your computer and use it in GitHub Desktop.
Some useful docker commands
* Build docker compose without cache:
docker build --no-cache
* Clean all:
docker system prune -a
* Force docker compose to rebuild:
docker compose rm -f
* Clean various stuff:
docker image prune
docker container prune
docker volume prune
docker network prune
* Connect to MariaDb container:
docker exec -it [dockerid] mariadb --user [user] -p[password]
* Build container:
docker build -t [tag] .
* Run container in interactive mode:
docker run -it -p 3000:3000 sfbib-fe
* Remove image:
docker rmi [dockerid]
* Build and restart one container in compose:
docker compose up --build --no-deps -d frontend/backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment