Build an image from local Dockerfile
docker build ./ -f Dockerfile -t kosh-mpcd
Run image in detached container and publish port
→ Also name the container
docker run -d -p 8000:8000 --name kosh-mpcd kosh-mpcd
To stop and remove containers based on their ancestral image
docker rm $(docker stop $(docker ps -a --filter ancestor=kosh-mpcd --format="{{.ID}}"))
Dockerfiles
RUN
;
keeps running,&&
stops immediately- fail fast!