Docker Notes


Docker Commands

  • docker build -t . : build an image

  • docker image ls : list all images

  • docker run -d -p 3000:3000 –name

  • docker exec -it bash

  • docker ps : show all running containers

  • docker rm -f : delete running containers forcely

  • docker run -v dirlocaldirectory/containerdirectory -d -p 3000:3000 –name : map a local Dockerfile to a image and start a container on this image

    • in this example, this command creates a docker container on a image: react-image, and it links the src folder in source code with src folder in the docker container


A u t h o r: Joe
P o l i c y: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source Joe !
Leave Your Comment Here
  TOC