![](https://seccdn.libravatar.org/avatar/e6dc8afd12f42302ae7b5ea72e4dd686.jpg?s=120&d=mm&r=g)
Hi Johannes,
Johannes Kastl
On 13.05.24 10:04 Dan Čermák wrote:
Johannes Kastl
writes: And then there's my talk from the openSUSE Conference 2023: https://www.youtube.com/watch?v=d9LTLzoJzJE (slides are here: https://github.com/dcermak/building-containers-in-obs)
Yes, I remembered that one. Was hoping we had a written summary of the topic, but might as well rewatch it. It was fun.
With the help of Dan's talk and slides I have successfully built two images in OBS. And I even got the second one building on top of the first.
Apparently the long long registry URL that is shown for a container image on registry.opensuse.org is only useful for podman from the outside.
Inside OBS, I could only reference an image in **the same project** by adding openSUSE:registry as a project in the containerfile build target:
<repository name="containerfile"> <path project="home:ojkastl_buildservice:containers:dumb-init" repository="15.6"/> <path project="home:ojkastl_buildservice:containers:helm-docs" repository="15.6"/> <path project="openSUSE:Registry" repository="standard"/> <path project="openSUSE:Containers:Leap:15.6" repository="containers"/> <arch>x86_64</arch> </repository>
The full path (used with podman) was not working. The path without the "registry.opensuse.org", i.e. "home/ojkastl_buildservice/containers/15.6/containerfile/ojkastl_buildservice/opensuse-leap-dumb-init" was not working. Using the tags from inside the image seems to work, but even then the images are sometimes blocked:
Generally, images are not referred to via the full path on the registry
(as that depends on the project name), but instead via the build tag
(the one that is added via the #!BuildTag magic comment).
In theory and if use_for_build is true, the built container should be
available in the buildroot and you can refer to it via:
```
FROM $BUILD_TAG_HERE
```
Cheers,
Dan
--
Dan Čermák