Import custom ISO and alternative approach to sudo reboot function in Docker image

I have been looking into creating a custom Docker image based on an existing ISO, the issue can be found in the following question below.

Import custom ISO into Docker

Further to the question, I asked if it is possible to use an image that has the sudo reboot function, but, I have heard that all docker images don’t have the reboot function. If that is the case, is there another approach to mimic the sudo reboot function in the docker image?

An ISO Image is usually a full operating system. This is usually run within a VM, not in a Docker container. A VM will also enable reboot.

Thank you for your reply. So based on your answer, it is not possible to import iso/img into a Docker image and use it as a container? (Say after adding all necessary services)

A container is just an isolated process. Are you sure you are not looking for a vm, or an os like container technology like LXC, LXD or the LXD fork Incus?

Yes, I am looking for Linux debian os container. Furthermore, I am looking for a VM container for IoT devices which also have gpio in the /sys/class/gpio for Beaglebones. I know gpio won’t work here as it is a virtual container but I wanted to be able to like simulate changes in the pin say like if I can force 1 or 0 or receive an input as 1 or 0 from the pin and then this value would go for conditional statements, etc…

So basically, I should follow the steps in this link to make my container be as an OS-like container?

LXC Getting Started

Think of docker container as “application virtualization” or “process virtualization”. You make it pretty clear that it’s not what you need.

I can’t really recommend anything here. Though, I would recommend researching the limitations of the os level container technologies you choose and test it out for your self.