

Its just a directory structure sort of thing with preinstalled programs or we can say a file system of an actual base image OS.
Docker portable apps install#
Unfortunately, what you're trying to do is just not what Docker is built for.Īs I understood docker, when you use a base image, you really do not install an additional OS. But you lose out on all the other nice Docker features as well. One other option you could look into if all you want is the resource management part of containers is using lxc-execute, as described in this answer.
Docker portable apps how to#
Here is some further reading on microcontainers and how to produce them. This is called a "microcontainer", and Go in particular is well-suited to producing these. That said, if you have a statically-linked binary that has absolutely no dependencies, it becomes easy to create a very minimal image. However, this is generally meant to be used for mounting data directories, and it still necessitates the Docker image having an OS. What you can do if you need stuff from the host OS is share a directory using Docker volumes. This means that the Docker image must contain an entire root filesystem and OS installation. Any Docker image is meant to run anywhere Docker is running, regardless of the operating system. The reason Docker images are like this is because they're meant to be portable. Use the CentOS base image, in which case your container will be running the same or very similar OS. This will give you the absolute minimum you need to get a container running.

Use a minimal base image, such as the BusyBox image. Each Docker image has its own root filesystem, which needs to have some sort of OS installed. What you're asking for isn't possible out-of-the-box with Docker.
