Uses the Dockerfile
to build a new image.
docker build -t [IMAGE-NAME] .
-t
flag tags your image.
at end tells build to search forDockerfile
on current dir
docker run -dp 127.0.0.1:3000:3000 [IMAGE-NAME]
-d
flag (--detach
) runs the container in background-p
flag (--publish
) creates a port mapping host and containerHOST:CONTAINER
docker ps
https://docs.docker.com/engine/reference/commandline/stop/
docker stop $(docker ps -q -a)
https://docs.docker.com/engine/reference/commandline/rm/
docker container rm #{container_name}
docker rm $(docker ps -q -a)
https://docs.docker.com/engine/reference/commandline/network_prune/
docker network prune -f
Return info about the given volume.
docker volume inspect [VOLUME-NAME]