简体   繁体   中英

How to create a docker base image?

My local system is ubuntu 14.04. In this local system, I installed VM which contains sles 12. In this local VM (sles 12), I configure some of the application of my use.

I'm totally new to Docker. I want to create a docker base image which contains this sles 12 image into which my applications are also present.

How I can create such a docker image, in which sles 12 os is available and into that my applications also can be run?

The docs have a section on creating base images.

The FROM will still be required but you can use the reserved "scratch" name here to create a base image from scratch (nice naming there Docker)

FROM scratch
ADD hello /
CMD ["/hello"]

Taken from the section on creating a base image using scratch

First of all, create a base SLES image. Luckily for you, this process is [semi]automated by SUSE through the utility called sle2docker. A manual can be found here: https://www.suse.com/documentation/sles-12/book_sles_docker/data/cha_sle2docker_installation.html https://github.com/SUSE/sle2docker

Then you should run your container, install and setup your custom software and do docker commit to create you personal customized image. https://docs.docker.com/engine/tutorials/dockerimages/

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