- docker images
- docker container ls -a
- docker ps
- docker build -t {my_name_tag} . //Must be done under same folder with Dockerfile
- docker run -d --privileged=true {image_id}
- docker run -it {image_id} /bin/bash
- docker logs {container_id} # dump the logs but not following
- docker logs -f {container_id} # dump and follow logs
- docker stop {container_id}
- docker kill {container_id}
- docker exec -it {container_id} /bin/bash # login to a daemon container
- docker image prune
- docker container prune
- docker system prune //Includes aboves
- CMD: a command that is run when the container first started. Can be override if container is started with command line
- ENTRYPOINT: now i am using it to run entrypoint.sh. Note that if ENTRYPOINT is a script that is finite, and you set the container to be a restarting daemon, it will restart again and again
- USER: state what is the user when we enter the container. Note the rest of the Dockerfile is still run as root's perspective and has nothing to do with what is in USER
- CMD counter part: command
- ENTRYPOINT counter part: entrypoint