Git cheat sheet
π³ Docker Cheatsheet
π§πΎ How to check how much memory the containers are consuming?
docker stats
docs: https://docs.docker.com/engine/reference/commandline/stats/
π§πΎβ𦳠Jump into a shell prompt inside a running docker?
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARGβ¦]
docker exec -it my-container:local /bin/sh
βΉοΈ For alpine use /bin/bash
while for debian /bin/bash
π±πΎ Jump into a shell prompt inside a container which is part of docker-compose
docker-compose run --rm worker /bin/bash
π§πΎβπ¦° Remove docker compose images using Make
In your Makefile:
DOCKER_IMAGES=$(shell docker images | grep <NAME OF YOUR APP|DIR >| sed -E 's/[[:space:]]+/,/g' | cut -d',' -f3)
remove_docker_images: stop_all
docker image rm --force $(DOCKER_IMAGES)
.NOPHONY: remove_docker_images
04 Sep 2023