Bunch of docker commands and helpful reminders
docker build -t <name> .
docker images -q <name> .
docker login <hostname:port>
docker tag <id> <hostname:port>/<name>:latest
docker push <hostname:port>/<name>:latest
docker run -d <name>
docker exec -it <id> /bin/bash
docker ps
docker ps -a
docker logs <id>
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
docker cp <container_id>:<container_path> <host_path>
docker cp ec6ed1137c46:/tmp/app.log .
docker build -t jclinto1/ubuntu .
image_id=$(docker images -q jclinto1/ubuntu)
docker tag $image_id jclinto1/ubuntu:latest
docker push jclinto1/ubuntu:latest
docker-compose up
docker-compose up -d
docker-compose down
This is most useful when you have an integration server and you want to refresh it on a cron from your private Docker repo
docker-compose pull