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?
2 Solutions collect form web for “How to create a docker base image?”
The docs have a section on creating base images.
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:
Then you should run your container, install and setup your custom software and do
docker commit to create you personal customized image.