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