Is it possible to specify in ubuntu-*.yaml to copy local files to container’s rootfs from the host that distrobuilder is running on? Use case is similar to Dockerfile COPY option.
No, there are no generators that currently let you copy a file from the machine that runs distrobuilder into the container image it’s generating.
It’s not something we’ve had a need for ourselves as we specifically don’t want the machine running distrobuilder to influence the resulting image in any way, but it wouldn’t be particularly difficult to implement such a generator should you want to do that.
I think there is a lot value in adding such feature. This would be particularly useful for setting up git repo with distrobuilder template like a docker file for CI/CD. For example copy and compile source files and configurations from current git repo to create and publish custom app containers to internal/public server, that can be used with lxc-download template. Since lxc does not have a concept of registry or public hub, this method will simplify publish method for anyone. Can you think of a temporary work around?
ansible can do this, and it has an lxc and lxd connection plugin.
Hi, is this feature still not implemented? I think it would be useful to have the option of copying host files to the new created filesystem, just after the deboostrap process finishes.
cloud-init can help you with that, in case the containerimage supports it.
Eighter with the integraded pupped module, or you simply install ansible and give it some commands to be executed with the runcmd command.