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 can I debug my docker container with docker-machine and PHPStorm
  • Locating data volumes in Docker
  • Is it safe to extract the root filesystem of a Docker.io image and use it in a chroot?
  • Sending docker build contexts
  • I'm attempting to connect to MongoDB with a Clojure application, via Docker
  • Is there a way to add only changed files to a docker image as a new layer - without resorting to docker commit?
  • How I can create such a docker image, in which sles 12 os is available and into that my applications also can be run?

  • Cannot run shell script placed on volume inside Docker container
  • Using Docker for JBOSS EAP and Oracle DB
  • Why it'll abort when I add `RUN ln -sf /dev/stderr /var/log/mysql/error.log` to mysql dockerfile?
  • Cannot run .exe (unsigned?) applications inside nanoserver
  • How to run 2 wordpress blogs using docker on ec2
  • How to configue Pydev test runner to use Docker
  • 2 Solutions collect form web for “How to create a docker base image?”

    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/

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.