Lxd: dockerfile and docker-compose equivalent

Created on 12 Jan 2018  路  3Comments  路  Source: lxc/lxd

I recently had to work with dockerfile, and docker-compose using multiple dockerfiles.

I have to say I like

  1. the declarative nature of both dockerfile and docker-compose
  2. the laziness of the dockerfile building (basically creating a snapshot after each executed line in a dockerfile)

From reading other issues, I understand the the proposed solution sofar is to use one or more shell scripts to handle that use-case.

Unfortunately, this approach has the drawback of not providing the same amount of declarative and reusing power that LXD could provide given an dockerfile and/or docker-compose equivalent.

Especially docker-compose could prove useful, when designing complex scenarios, testing them, and rebuilding them over and over again because of minimal changes.

Most helpful comment

for anyone reading this due to a "google search" for "docker compose equivalent for lxd" ...
I know of one project:
https://github.com/lxdock/lxdock

Haven't used it but seems promising.

All 3 comments

It's not something that we have an interest in adding to the LXD client at this point.
Scripting should let you do all that today and if someone wants to make a tool that uses a more declarative syntax around it, it should be pretty easy to do with our API.

For the specific case of generating custom LXD images, we are busy reworking the LXC image generation scripts to replace them with a new tool that uses declarative input and outputs a LXC or LXD image. This work is done by @monstermunchkin over in LXC (https://github.com/lxc/lxc/issues/2072).

Closing since we don't expect to do that kind of work in LXD but hopefully the "distrobuilder" work that's ongoing will address at least part of this use case. I'd recommend commenting in that other issue about the kind of thing you need as part of image creation.

for anyone reading this due to a "google search" for "docker compose equivalent for lxd" ...
I know of one project:
https://github.com/lxdock/lxdock

Haven't used it but seems promising.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rrva picture rrva  路  5Comments

fwaggle picture fwaggle  路  4Comments

spacekookie picture spacekookie  路  3Comments

AndreiPashkin picture AndreiPashkin  路  5Comments

jsnjack picture jsnjack  路  3Comments