https://docs.docker.com/engine/reference/commandline/save/#cherry-pick-particular-tags
$ docker commit <container ID> <image name>
$ login, pull, push
--- docker linux on window : require Hyper-V?
https://stefanscherer.github.io/run-linux-and-windows-containers-on-windows-10/
https://forums.aws.amazon.com/message.jspa?messageID=755831
http://www.deploycontainers.com/2017/10/25/uninstall-docker-windows-server-2016/
https://stackoverflow.com/questions/41709354/docker-ip-for-windows
Are you running "Docker for Windows" or "Docker Toolbox for Windows"? if it is Docker Toolbox, the default ip address should be 192.168.99.100, you should be able to see it when you start docker shell, otherwise the ip address should be same as your local machine.
-- docker deamon not run
https://forums.docker.com/t/restart-docker-service-from-command-line/27331/7
$ docker-machine restart
https://www.peterbe.com/plog/no-space-left-on-device-on-osx-docker
-- view log
https://docs.docker.com/engine/reference/commandline/logs/#usage
--- vao docker (exec -i -t)
--kill process in docker
https://stackoverflow.com/questions/27757405/how-to-kill-process-inside-container-docker-top-command
-- custom port and ip
https://runnable.com/docker/binding-docker-ports
--copy from host to docker
https://stackoverflow.com/questions/22907231/copying-files-from-host-to-docker-container/31971697
-- gunicorn on docker
https://sebest.github.io/post/protips-using-gunicorn-inside-a-docker-image/
-- mount folder
https://rominirani.com/docker-on-windows-mounting-host-directories-d96f3f056a2c
-- environtment variable
https://stackoverflow.com/questions/33379393/docker-env-vs-run-export
-- print from docker
https://blog.onetwentyseven001.com/cups-raspberry-printer/#.W084Th6tTOR
-- clean cache
https://mohitgoyal.co/2017/07/03/clear-docker-cache-to-save-disk-space/
docker save --output /Users/louis/Documents/docker_flax.tar docker_flax
docker load --input docker_flax.tar
To rename (copy) an image, you give it a new tag, and then remove the old tag using the ‘rmi’ command:
$ docker tag <old_name> <new_name>
$ docker rmi <old_name>
This second step is scary, as ‘rmi’ means “remove image”. However, docker won’t actually remove the image if it has any other tags. That is, if you were to immediately follow this with: docker rmi <new_name>, then it would actually remove the image (assuming there are no other tags assigned to the image).
$ docker run -p 5000:5000 test_docker_flax
$ docker image ls
$ docker rmi <image ID> -f
$ docker build -t test_docker_flax .
$ docker container ls
$ docker stop <container ID>
$ docker stop $(docker ps -a -q)
$ docker images --filter dangling=true
$ docker rmi `docker images --filter dangling=true -q` -f
$ docker image tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
$ docker login [OPTIONS] [SERVER]
$ docker run -p 5000:5000 -e WORKERS=2 -e CLASS=sync -e TIMEOUT=120 -e KEEPALIVE=30 test_config_gunicorn
If you run out of disk space in your Docker containers on OSX, this is probably the best thing to run:
$ docker rm $(docker ps -q -f 'status=exited')
$ docker rmi $(docker images -q -f "dangling=true")
$ docker exec -i -t containerId /bin/bash
$ docker top <container ID>
$ kill -9 process_id
$ docker run -v d:/data:/data alpine ls /data
$ docker run -it -v d:/data:/data alpine /bin/sh
'run /bin/bash' after instantiating the container -> skip CMD