openSUSE / obs-docu

Official Open Build Service Documentation. Content gets reviewed and edited. Generated books are available at http://www.openbuildservice.org
34 stars 71 forks source link

How to use '_multibuild' like spec when compiling the container #344

Open arsenalpoll opened 10 months ago

arsenalpoll commented 10 months ago

I found that when using '.spec' compilation, you can use _multibuild to define multiple compilations

Example: aa.spec bb.spec cc.spec

Now I have the same requirement for docker build, I want to use Dockerfile-a Dockerfile-b Dockerfile-c to multibuild like spec.

But I found that only one Dockerfilecan be used, Dockerfile-a cannot be used, defining _multibuild has no effect

my example : https://build.opensuse.org/package/show/home:arsenalpoll/multibuild_container

kkaempf commented 9 months ago
anmazzotti commented 1 month ago

@arsenalpoll a bit late, but there's an example you may find useful: https://build.opensuse.org/package/show/isv:Rancher:Elemental:Dev/elemental-channel

The caveat is that all the Dockerfiles need to be extracted (in _service), and they must follow the Dockerfile.FLAVOR naming convention (from _multibuild).