You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Etienne Dublé edited this page Mar 29, 2016
·
6 revisions
Docker is a convenient tool when setting up an operating system. But, at the end of the process, sometimes we want to run this operating system on a real machine, instead of a container. With debootstick, we can achieve this easily. The idea is to export the filesystem content of a container and use it as input of debootstick.
Exporting the filesystem tree
Exporting the filesystem tree of a docker container can be done by using the docker export command.
If what we have is not a container but a docker image (ubuntu:14.04 in this example), we will have to generate a container from the image first:
$ docker create --name mycontainer ubuntu:14.04
We can now retrieve the content of this container, and then remove it.
$ mkdir mycontainer_fs
$ cd mycontainer_fs/
$ docker export mycontainer | tar xf -
$ docker rm mycontainer # not needed anymore
Customization
The OS embedded in official Ubuntu docker images is slightly customized. In particular, starting services is disallowed. We have to revert this: