Docker
https://unixism.net/2020/06/containers-the-hard-way-gocker-a-mini-docker-written-in-go/
add to docker notes: https://jdlm.info/articles/2019/09/06/lessons-building-node-app-docker.html
-
-p,--publish [HOST:]CONTAINER
-- if no HOST, it gets ephemeral host port -
-P,--publish-all
-- all container's EXPOSEd to ephemeral host port -
Dockerfile:
EXPOSE PORT[/PROTO]
- Ever used by kube?
- Ever used by docker-compose?
- Seemingly not :-(
The EXPOSE instruction does not actually publish the port. It functions as a type of documentation between the person who builds the image and the person who runs the container, about which ports are intended to be published.
- ports: '[HOST:]CONTAINER' -- as above
- expose: 'CONTAINER' -- exposes port to other services, but not the host
-
https://linuxize.com/post/how-to-remove-docker-images-containers-volumes-and-networks/
docker system prune -a docker system prune --volumes docker container prune
Remove all images: docker rmi $(docker images -a -q)
-
dive: go get github.com/wagoodman/dive
-
docker container inspect
-
docker diff
-
docker image history
-
docker image inspect