github.com/guilhermebr/docker@v1.4.2-0.20150428121140-67da055cebca/docs/man/docker-commit.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-commit - Create a new image from a container's changes
     6  
     7  # SYNOPSIS
     8  **docker commit**
     9  [**-a**|**--author**[=*AUTHOR*]]
    10  [**--help**]
    11  [**-c**|**--change**[= []**]]
    12  [**-m**|**--message**[=*MESSAGE*]]
    13  [**-p**|**--pause**[=*true*]]
    14  CONTAINER [REPOSITORY[:TAG]]
    15  
    16  # DESCRIPTION
    17  Using an existing container's name or ID you can create a new image.
    18  
    19  # OPTIONS
    20  **-a**, **--author**=""
    21     Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
    22  
    23  **-c** , **--change**=[]
    24     Apply specified Dockerfile instructions while committing the image
    25     Supported Dockerfile instructions: `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
    26  
    27  **--help**
    28    Print usage statement
    29  
    30  **-m**, **--message**=""
    31     Commit message
    32  
    33  **-p**, **--pause**=*true*|*false*
    34     Pause container during commit. The default is *true*.
    35  
    36  # EXAMPLES
    37  
    38  ## Creating a new image from an existing container
    39  An existing Fedora based container has had Apache installed while running
    40  in interactive mode with the bash shell. Apache is also running. To
    41  create a new image run `docker ps` to find the container's ID and then run:
    42  
    43      # docker commit -m="Added Apache to Fedora base image" \
    44        -a="A D Ministrator" 98bd7fc99854 fedora/fedora_httpd:20
    45  
    46  ## Apply specified Dockerfile instructions while committing the image
    47  If an existing container was created without the DEBUG environment
    48  variable set to "true", you can create a new image based on that
    49  container by first getting the container's ID with `docker ps` and
    50  then running:
    51  
    52      # docker commit -c="ENV DEBUG true" 98bd7fc99854 debug-image
    53  
    54  # HISTORY
    55  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
    56  based on docker.com source material and in
    57  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    58  July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    59  Oct 2014, updated by Daniel, Dao Quang Minh <daniel at nitrous dot io>