Cheatsheet

Docker cheat sheet

TaskCommandGet Bash shell in a container docker exec -it <container name> /bin/bash Clear no-tags images (or dangling images)docker rmi $(docker images –filter “dangling=true” -q –no-trunc)Get docker instance’s IPdocker inspect –format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}’ $INSTANCE_IDDump Postgres database to .sql filedocker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y”_”%H_%M_%S`.sql-U postgres : database usernameImport .sql files to Postgres dbcat your_dump.sql…

Loading…

Something went wrong. Please refresh the page and/or try again.