GithubHelp home page GithubHelp logo

docker-cli's Introduction

Docker - Essential Commands

  • The below are the list of essential commands we are in need
Commands Description
docker ps List all running containers
docker ps -a List all containers stopped, running
docker stop container-id Stop the container which is running
docker start container-id Start the container which is stopped
docker restart container-id Restart the container which is running
docker port container-id List port mappings of a specific container
docker rm container-id or name Remove the stopped container
docker rm -f container-id or name Remove the running container forcefully
docker pull image-info Pull the image from docker hub repository
docker pull stacksimplify/springboot-helloworld-rest-api:2.0.0-RELEASE Pull the image from docker hub repository
docker exec -it container-name /bin/sh Connect to linux container and execute commands in container
docker rmi image-id Remove the docker image
docker logout Logout from docker hub
docker login -u username -p password Login to docker hub
docker stats Display a live stream of container(s) resource usage statistics
docker top container-id or name Display the running processes of a container
docker version Show the Docker version information
docker system prune clean up any resources — images, containers, volumes, and networks
docker system prune -a To additionally remove any stopped containers and all unused images

Docker - Essential Commands - VN

  • docker -itd (-d: chạy ngầm, -i: trả về khi gõ command (stdin), -t: hiện cửa sổ dòng lệnh (terminal))

  • docker ps/docker container ls (-a): list running contaienr/list all container

  • docker create/docker container create: tạo mới container

  • docker run/docker container run: chạy container

  • docker rm/docker container rm: xóa (-f: xóa container chưa stop)

  • docker prune/ docker container prune: xóa tất container đang stop

  • docker start/docker container start: start container (tương tự: stop/restart/pause/unpause/kill=stop)

  • docker logs/docker container logs: hiển thị log của container

  • docker inspect/docker container inspect: hiển thị thông tin chi tiết container

  • docker stats/ docker container stats: hiển thị tài nguyên container

  • docker top/docker container top: hiển thị tiến trình container

  • docker port/docker container port: hiển thị port được map

  • docker diff/docker container diff: hiển thị thay đổi về filesystem

  • docker attach/docker container attach: attach 1 màsn hình cho phép nhập input/hiển thị output

  • docker exec/docker container exec: thực thi 1 câu lệnh trong container đang chạy

  • docker update "" container "": update resource cho container, mở rộng tài nguyên

  • docker cp/docker container cp: copy file giữa host và container

  • docker rename/docker container rename: đổi tên

  • docker export/docker container export: export toàn bộ filesystem in container

  • docker commit: tạo image từ running container

  • docker images/docker image ls: list images

  • docker image pull: download image (default: dockerhub)

  • docker image push: push image

  • docker inspect/docker image inspect: hiển thị chi tiết image

  • docker image history: hiển thị lịch sử image

  • docker image tag: tạo 1 image tag mới

  • docker image save/docker iamge load: save image > file tar (load từ file tar)

  • docker image rm: xóa image

docker-cli's People

Contributors

trieuconcrete avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.