I often use it, but for some reason I forget it soon (personal opinion) This is a copy / paste record of the docker command.
i is standard input, t is tty assignment, d is background execution option
docker run -it --name <Container name> -d -p 80:80 <Image name>
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <Container name>
I use it to see the volume mount status of a 90% container, but I'm sure there is an option to check only the mount. (Grep it because it's troublesome to check)
docker inspect <Container name>
It is convenient to change the contents of $ () and substitute it (but forget it soon)
docker rm $(docker ps -aq)
Useful for isolating when container startup fails.
docker commit <Container ID> <Arbitrary image name>
Recommended Posts