简体   繁体   中英

What is the equivalent of docker commit in singularity?

Is there an equivalent to docker commit in Singularity ?

(note: docker commit enables to create a new image from a container's changes)

The closest equivalent is to create a sandbox image with sudo singularity build --sandbox... , enter it with sudo singularity shell --writable sandbox/ , and make your changes there.

When you run a sandbox in writable mode, all changes you make are saved to the image/directory. Once you are happy with them, you can then create a (much smaller) read only image from the sandbox for production use.

It is important to note that in this case, you need to use sudo when modifying the container. More info on sandboxes and --writable are in the documentation , including how to create a new image from an existing one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM