Results 1 to 3 of 3

Thread: How to build a Docker container against another container?

Hybrid View

  1. #1

    Question How to build a Docker container against another container?

    In OBS, how does one reference another OBS base image for a Docker container build?

    One can, for example, base off the latest leap image as follows:

    Code:
    FROM opensuse/leap:latest
    But, I can't figure out the syntax for container in a home project.

    I tried to use another image in the same subproject:

    Code:
    FROM other_image:latest
    But this yields the following from `osc build`:

    Code:
    buildinfo is broken... it says:
    unresolvable: have choice for dbus-launch needed by libgio-2_0-0: dbus-1 dbus-1-x11
    If I try to use home project syntax as follows:

    Code:
    FROM home:lewellyn:containers:other_image:latest
    I get the following output:

    Code:
    buildinfo is broken... it says:
    unresolvable: nothing provides container:home:lewellyn:containers/other_image:latest
    I do not get that output with any of the opensuse base images, so I suspect my package/project isn't necessarily broken.

    For clarity, my eventual goal is to start building my containers in my own OBS instance. But it's generally far easier to get started in the public OBS.

    And for that reason, I don't really want to list the package names, as that whole subproject may end up vanishing by the time someone else stumbles down this question in the future.

    It seems that it'd be relatively easy to get going, but I'm missing some key information that I don't know. I tried even adding the project to its own configuration as a repository path, but that (obviously) did not work.

    Also, I've read in another thread that there are Tumbleweed OCI images, but I can't find those to try to use as base images in OBS either.

    Does anyone have any pointers? I have not found any useful information for using Dockerfiles in OBS for home projects beyond Introduction of the new OBS Container Registry - Open Build Service and that page kind of ignores the whole layering approach which is common. I also found Building derived containers - openSUSE Wiki which implies the home:lewellyn:containers/other_image:latest syntax is correct.

  2. #2
    Join Date
    Sep 2012
    Posts
    6,638

    Default Re: How to build a Docker container against another container?

    Quote Originally Posted by lewellyn View Post
    I also found Building derived containers - openSUSE Wiki which implies the home:lewellyn:containers/other_image:latest syntax is correct.
    Where does it imply it? According to page you reference this would be home/lewellyn/containers/other_image:latest and of course it needs to be published. So far there are two containers from you published on https://registry.opensuse.org/ and none of them is other_image.

  3. #3

    Default Re: How to build a Docker container against another container?

    Quote Originally Posted by arvidjaar View Post
    Where does it imply it? According to page you reference this would be home/lewellyn/containers/other_image:latest and of course it needs to be published. So far there are two containers from you published on https://registry.opensuse.org/ and none of them is other_image.

    As I said, I'm not giving the exact image names in this thread to save future viewers hunting for things that probably don't exist anymore in OBS (since the goal is to start building images in my own instance once I figure out how they work in the supported public instance). It'd be better if future readers got answers that don't involve going through OBS history, anyhow.

    But of the two that I currently have published, it should be obvious which is the base image. I don't have any binaries in OBS for the other, since I did an `osc wipebinaries --unresolvable` so if those are in the registry still, there might be a bug?

    I have done an `osc ci` using that slash-delimiter syntax, which I had not tried before. But still "nothing provides" it, so it's still unresolvable in OBS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •