docker
- show help docker commanddocker version
- show version dockerdocker info
- show information docker
docker system prune
- clear all container and images in enviroment
docker images ls
- show all imagesdocker pull [IMAGENAME]:[VERSION]
- download docker images from hub.docker.com which imagename and versiondocker build -t [ASSIGNNAME] .
- build images from dockerfile in current directorydocker rmi [IMAGE NAME or ID]
- delete docker imagesdocker rmi $(docker images -aq)
- delete all docker imagesdocker tag [IMAGENAME] [IMAGENEWNAME]
- assign tag for new docker imagesdocker image prune --filter="dangling=true"
- remove images with none tag
docker ps -a
- show docker container with all statusdocker run --name [CONTAINER NAME] -it [IMAGENAME] --rm(Automatically remove the container when it exits) -d(daemon) -p(Publish or expose port) -e(Set environment variables)
- run docker containerdocker [start | stop | restart] [CONTAINER NAME or ID]
- operation docker containerdocker container prune
- remove all stopped containers
docker exec -it [CONTAINER NAME or ID] [bash or sh or /bin/bash or /bin/sh]
- enter to docker container with sshdocker stop $(docker ps -aq) && docker rm $(docker ps -aq)
- stop and remove all docker containerdocker commit [CONTAINER was edited] [IMAGEwithNewName]
- Commit for get new container after enter ssh edit something in docker containerdocker cp [CONTAINER]:[DIRECTORYINCONTAINER] [LOCALDIRECTORY]
- copy file in containerdocker cp [FILEINLOCAL] [CONTAINER]:[DIRECTORYINCONTAINER]
- copy file from local to containerdocker cp -L [SHORTCUTINLOCAL] [CONTAINER]:[DIRECTORYINCONTAINER]
- copy file local via shotcut
docker logs [CONTAINER NAME or ID]
- show logs containerdocker logs -f [CONTAINER NAME or ID]
- show realtime logs containerdocker inspect [CONTAINER NAME or ID]
- show inspect configure docker containerdocker stats [CONTAINER NAME or ID]
- show CPU, MEM, I/Odocker top [CONTAINER NAME or ID]
- Display the running processes of a containerdocker port [CONTAINER NAME or ID]
- List port mappings or a specific mapping for the container
docker save [IMAGE] > [OUTPUT.tar]
- Save Image to file.tardocker save [ --output | -o ] [OUTPUT.tar] [IMAGE]
- Save Image to file.tardocker save myimage:latest | gzip > myimage_latest.tar.gz
- Save Image to file.tar.gzdocker load < IMAGE.tar.gz
- import Images filedocker load --input FILE.tar
- import Images file