Thursday, November 3, 2016

Docker commands - Reference

Useful Docker commands

This blog post is a reference for Docker commands.

These commands can be got by typing "docker" or "man docker" in the CLI after successful installation of Docker.

Basic commands


    info  - Display system-wide information
    version -  Show the Docker version information
    start -  Start one or more stopped containers
    stop -  Stop a running container
    pull -  Pull an image or a repository from a registry
    push - Push an image or a repository to a registry
    cp -  Copy files/folders between a container and the local filesystem
    create -   Create a new container
    diff - Inspect changes on a container's filesystem
    restart -  Restart a container


Other commands


    attach  -  Attach to a running container
    build  -    Build an image from a Dockerfile
    commit -  Create a new image from a container's changes
    events -    Get real time events from the server
    exec  -    Run a command in a running container
    export -   Export a container's filesystem as a tar archive
    history -  Show the history of an image
    images  -  List images
    import  -  Import the contents from a tarball to create a filesystem image
    inspect -   Return low-level information on a container or image
    kill   -   Kill a running container
    load -   Load an image from a tar archive or STDIN
    login -  Log in to a Docker registry
    logout - Log out from a Docker registry
    logs - Fetch the logs of a container
    network -  Manage Docker networks
    pause -   Pause all processes within a container
    port -  List port mappings or a specific mapping for the CONTAINER
    ps -  List containers
    rename -   Rename a container
    rm -      Remove one or more containers
    rmi -     Remove one or more images
    run -     Run a command in a new container
    save -    Save one or more images to a tar archive
    search - Search the Docker Hub for images
    stats -   Display a live stream of container(s) resource usage statistics
    tag -     Tag an image into a repository
    top -     Display the running processes of a container
    unpause - Unpause all processes within a container
    update -  Update configuration of one or more containers
    volume -  Manage Docker volumes
    wait -    Block until a container stops, then print its exit code


No comments:

Post a Comment