Uploading Singularity Image Files (.sif) to the Container Registry fails with Bad Request (400)
Summary
NOTE: Follow #605 (closed) for updates, as that's the underlying issue.
As far as I know, Gitlab's container registry should be OCI compatible. So it should accept singularity images (.sif). In fact, there are reports that this used to work at some point (also take a look at gitlab#16269 (closed)).
However, trying to push a singularity image to the container registry results in a message like this:
Error: failed commit on ref "manifest-sha256:372c5c9b945e79eda28c888f87544dc6a692ba99cd1d43df6ec5f447e074c625": unexpected status: 400 Bad Request
There are/were some issues with gitlab responding with a 500 status because the of some empty config option, but this is not it. (I tried those solutions).
Steps to reproduce
- Install singularity
- Fork and then clone this repository: https://gitlab.com/obob/obob-singularity-container
- build the hello.def image:
sudo singularity build hello.sif container/hello.def - Get an access token in order to be able to upload to the container registry
- log singularity in to gitlab:
singularity remote login -u USERNAME oras://registry.gitlab.com/v2and use the token you just generated - try to push the sif file:
singularity push hello.sif oras://registry.gitlab.com/obob/obob-singularity-container/test, modifiying theorasurl so it matches the container registry url of your forked version.
Example Project
https://gitlab.com/obob/obob-singularity-container
What is the current bug behavior?
the singularity push command returns:
Unable to push image to oci registry: unable to push: failed commit on ref "manifest-sha256:2861d3c2c1aff0c981b842a7359240276c0daffd5235c73ad172d270cf38548d": unexpected status: 400 Bad Request
I can see the tag being created in the container registry but nothing is uploaded.
What is the expected correct behavior?
The image uploads correctly.
Output of checks
This bug happens on GitLab.com