2014-04-16 12:07:55 -06:00
|
|
|
% DOCKER(1) Docker User Manuals
|
2014-07-01 12:58:04 +10:00
|
|
|
% Docker Community
|
|
|
|
% JUNE 2014
|
2014-04-16 12:07:55 -06:00
|
|
|
# NAME
|
2014-07-01 12:58:04 +10:00
|
|
|
docker-commit - Create a new image from a container's changes
|
2014-04-16 12:07:55 -06:00
|
|
|
|
|
|
|
# SYNOPSIS
|
2014-07-01 12:58:04 +10:00
|
|
|
**docker commit**
|
|
|
|
[**-a**|**--author**[=*AUTHOR*]]
|
2014-10-15 17:14:12 -04:00
|
|
|
[**--help**]
|
2014-07-01 12:58:04 +10:00
|
|
|
[**-m**|**--message**[=*MESSAGE*]]
|
2014-07-23 12:40:10 +10:00
|
|
|
[**-p**|**--pause**[=*true*]]
|
2014-11-28 14:21:55 +10:00
|
|
|
CONTAINER [REPOSITORY[:TAG]]
|
2014-04-16 12:07:55 -06:00
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
Using an existing container's name or ID you can create a new image.
|
|
|
|
|
|
|
|
# OPTIONS
|
2014-07-01 12:58:04 +10:00
|
|
|
**-a**, **--author**=""
|
|
|
|
Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
|
2014-04-16 12:07:55 -06:00
|
|
|
|
2014-10-15 17:14:12 -04:00
|
|
|
**--help**
|
|
|
|
Print usage statement
|
|
|
|
|
2014-07-01 12:58:04 +10:00
|
|
|
**-m**, **--message**=""
|
2014-04-16 12:07:55 -06:00
|
|
|
Commit message
|
|
|
|
|
2014-07-23 12:40:10 +10:00
|
|
|
**-p**, **--pause**=*true*|*false*
|
|
|
|
Pause container during commit. The default is *true*.
|
2014-07-01 00:39:38 +00:00
|
|
|
|
2014-04-16 12:07:55 -06:00
|
|
|
# EXAMPLES
|
|
|
|
|
|
|
|
## Creating a new image from an existing container
|
2014-04-21 11:55:06 -06:00
|
|
|
An existing Fedora based container has had Apache installed while running
|
2014-04-16 12:07:55 -06:00
|
|
|
in interactive mode with the bash shell. Apache is also running. To
|
2014-04-17 09:36:58 -06:00
|
|
|
create a new image run docker ps to find the container's ID and then run:
|
2014-04-16 12:07:55 -06:00
|
|
|
|
2014-06-05 11:41:45 +10:00
|
|
|
# docker commit -m="Added Apache to Fedora base image" \
|
2014-06-05 11:25:55 +10:00
|
|
|
-a="A D Ministrator" 98bd7fc99854 fedora/fedora_httpd:20
|
2014-04-16 12:07:55 -06:00
|
|
|
|
|
|
|
# HISTORY
|
|
|
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
2014-07-02 10:30:25 +10:00
|
|
|
based on docker.com source material and in
|
2014-07-01 12:58:04 +10:00
|
|
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2014-07-23 12:40:10 +10:00
|
|
|
July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|