[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bootstrap-vz and LXC



On Fri, Dec 08, 2017 at 02:25:26PM +0100, Geert Stappers wrote:
> On Thu, Dec 07, 2017 at 09:47:59PM +0000, Anders Ingemann wrote:
> > On Thu, Dec 7, 2017 at 11:23 AM Geert Stappers wrote:
> > >
> > > Summary: searching for tool for creating LXC "image"
> > >
> > > According https://github.com/andsens/bootstrap-vz
> > > can bootstrap-vz create "Docker images".
> > >
> > > AFAIK is Docker  LXC,  LinuX Containers, with many extras.
> > >
> > > Can bootstrap-vz be used for creating LXC "images"?
> > >
> > > Or perhaps:
> > > Can a bootstrap-vz generated Docker images in plain LXC environments?
> > >
> > The Docker images created by bootstrap-vz aren't really special with
> > regards to Docker.
> > The only special things that are done for docker is tar-gz'ing the
> > resulting folder, creating the docker entry file and then adding it to the
> > docker registry.

Snippet from bootstrapvz/provider/docker/tasks/images/CreateImage

        tar_cmd = ['tar', '--create', '--numeric-owner',
                   '--directory', info.volume.path, '.']
        docker_cmd = ['docker', 'import']
        cmd = ' '.join(map(quote, tar_cmd)) + ' | ' + ' '.join(map(quote, docker_cmd))
        [info._docker['image_id']] = log_check_call([cmd], shell=True)


That boils to

  What was prepared in the (temporary) bootstrap-vz environment
  is "saved" by the Docker import command.


> > The docker provider init file gives a nice overview:
> > https://github.com/andsens/bootstrap-vz/blob/master/bootstrapvz/providers/docker/__init__.py
> 
> Wow, that really answers my "Should I evaluate bootstrap-vz further?"  Yes
> 
> Thanks
> 

Thing I haven't found in the bootstrap-vz source code yet,
is how to get the prepared LXC tree out of the (temporary) build envirment.

Task image.MoveImage wants an image_path 

Is the piece that I miss in the source of current bootstrap-vz ?


Groeten
Geert Stappers
-- 
Leven en laten leven


Reply to: