Introduction of the new OBS Container Registry
Did you know that OBS can not only build RPM packages and appliances but also container formats like docker? This is a new feature we introduced last year! But how can you make use of containers you build with OBS?
We recently introduced our https://registry.opensuse.org!
Read on if you want to know more
How can you build containers with OBS?
The easiest way to create your own container is branching one of the official openSUSE/SUSE Container Templates and modify it to your needs.
In general you can choose between two bulding flavours:
- Build with native docker tools (Dockerfile)
- Build with kiwi (expert level or for those who are already familiar with kiwi)
To start with an existing image
- Choose one of the image templates named “Container built using …”
- Enter the name of you new appliance in the text field below “Name your appliance”
- Click on the “Create appliance” button
- As last step you need to enable the publish flag for the image & container repositories, otherwise your newly created containers won’t show up on the registry.
If you branch the same container multiple times, you need to change the name/tag information in the config.kiwi/Dockerfile to avoid overwriting your containers because of name/tag collisions.
Due to docker’s restrictions all project/repository/package names will be converted to lower case names in the registry.
Both project names will result in the same repository path in the registry and may overwrite each other’s results.
Search/Browse/Use available containers
In our overview page at https://registry.opensuse.org, you have the ability to search a listing of all available container built by OBS. If you click on the blue box for a certain image, another box will open up with further information about this image, including a grey box containing the “docker pull” command for this image.
Additionally a file named
<binary-package>.registry.txt will be created
in your repository in
which contains information how to pull your image from https://registry.opensuse.org.
If you want to enable container signature verification simply set the following environment variable in your shell:
If multiple architectures are enabled for your image repository, OBS publishes a so-called ‘fat’ manifest, so that docker automatically chooses the matching architecture when the container is fetched from the registry.