commit
Usage: hyper commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
Create a new image from a container's changes
-a, --author="" Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
-c, --change=[] Apply specified Dockerfile instructions while committing the image
--help Print usage
-m, --message="" Commit messageIt can be useful to commit a container's file changes or settings into a new image. This allows you to debug a container by running an interactive shell, or to export a working dataset to another server. However, it is generally better to use Dockerfiles to manage your images in a documented and maintainable way.
The commit operation will not include any data contained in volumes mounted inside the container.
The --change option will apply Dockerfile instructions to the image that is created. Supported Dockerfile instructions: CMD|ENTRYPOINT|ENV|EXPOSE|LABEL|ONBUILD|USER|VOLUME|WORKDIR
The commit operation only works on stopped container for now.
Examples
Commit a container
$ hyper ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
50d6ab76a13a busybox "sh" About a minute ago Exited (0) 3 seconds ago
$ hyper commit 50d6ab76a13a user/testimage:v1
sha256:a0696d8da7b60abe14cb962156fee7c03cbcafd02e8b5ed8de679a5a1a5f768f
$ hyper images
REPOSITORY TAG IMAGE ID CREATED SIZE
user/testimage v1 a0696d8da7b6 30 seconds ago 1.126 MBCommit a container with a new configuration
Commit a container with new CMD instruction
CMD instructionLast updated