My Essential Docker Commands Cheat Sheet

Docker commands I use regularly: 1. Complete Environment Cleanup docker-compose down --remove-orphans -v --rmi all --remove-orphans: Deletes containers for services not in compose file -v: Removes attached volumes --rmi all: Deletes all images used by services 2. Run Image with Interactive Shell docker run -it --entrypoint bash wazuh/wazuh-certs-generator:0.0.1 docker run -it --entrypoint bash ubuntu:focal -it: Interactive terminal --entrypoint bash: Overrides default to give shell access 3. Find Container IP Address docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps | grep -i dashboard | awk '{print $1}') docker ps | grep -i dashboard: Finds container with “dashboard” in name ...

June 7, 2025 · 1 min · Elwali Karkoub

Check connectivity using only CURL

I have had situations where I needed to check the connectivity using telnet but the server did not have it installed nor the possiblity to do so. I’ve found that it can be achieved using only curl: curl -vv telnet://serverIP:port This will use the telnet portocol instead of the known http(s). curl support about 28 protocols that you can find here: https://everything.curl.dev/protocols/curl.html

December 28, 2024 · 1 min · Elwali Karkoub