0

I want to create a parent image with running host.

Over docker website it is written that we can do it, but I wanted to know the steps which are missing from this page. https://docs.docker.com/develop/develop-images/baseimages/

Even it is not correct for docker environment still I need it for one POC.

I can see option to create image from tar file like:

FROM scratch
MAINTAINER \
[Adam Miller <maxamillion@fedoraproject.org>] \
[Patrick Uiterwijk <patrick@puiterwijk.org>]
ENV DISTTAG=f30container FGC=f30 FBR=f30
ADD fedora-30-x86_64-20180906.tar.xz /

Can I create a tar file of root file system with normal tar command and use to create parent image ?

  • Possible duplicate of [How to make docker image of host operating system which is running docker itself?](https://stackoverflow.com/questions/26742967/how-to-make-docker-image-of-host-operating-system-which-is-running-docker-itself) – David Maze Sep 18 '18 at 09:49
  • Remember that a Docker container typically runs one process, and a typical host-system init setup manages hardware devices, kernel parameters, network interfaces, and things like ttys that really just don't exist in Docker. The overall Docker approach tends to be towards reproducible immutable disposable setups (if you lose `/var/lib/docker` it's no big deal because you can rebuild your container from an image and the image from the Dockerfile in source control), and even for a proof-of-concept you'll be much better off building an image properly from a standard OS base image. – David Maze Sep 18 '18 at 09:52

0 Answers0