command run with params
docker run busybox echo hi there
docker run busybox lscontainer run with port mapping
docker run -p 80:3000 [container id]separated run
docker create hello-world
docker start -a [container id]get stdout from the container
docker logs [container id]run command inside the container
docker exec -it [container id] [command]
docker exec -it 4e3d15293585 sh
docker run -it alpine shrun container on background
docker run -d [container id]build an image
docker build .build an image with tag
docker build -t dideex/name:tag .build with custom Dockerfile
docker build -f Dockerfile.devrun composed images
docker-compose up
docker-compose up --buildstop the running composed containers
docker-compose downcompose status(depends on current directory)
docker-compose psstart silent
docker-compose [container id] -dshow running containers
docker ps
docker ps --allcommit a command into container
docker commit -c 'CMD ["redis-server"]' [container id]clean cache and other staff
docker system pruneshutdown the container
docker stop [container id]
docker kill [container id]Attach local standard input, output, and error streams to a running container
docker attach [container id]add spareted volume to the container
docker run -p 80:3000 -v /app/node_modules -v $(pwd):/app [container id]
# for docker toolbox
docker run -p 80:3000 -v /app/node_modules -v /c/frontend/:/app [container id]