singularityhub / sregistry

server for storage and management of singularity images
https://singularityhub.github.io/sregistry
Mozilla Public License 2.0
103 stars 42 forks source link

docker-compose not working with current version #392

Closed loz-hurst closed 1 year ago

loz-hurst commented 2 years ago

Describe the bug

Unable to start sregistry with the master branch's docker-compose.yml (fresh checkout, using directions in docs).

To Reproduce

Following the directions in the docs to deploy a test docker instance, after configuring and successfully building with docker build -t quay.io/vanessa/sregistry . docker-compose up fails with:

$ docker-compose up
(root) Additional property db is not allowed

docker-compose build also fails with the same error:

$ docker-compose build
(root) Additional property db is not allowed

Expected behavior

Containers are created and started by docker-compose.

If applicable, add versions and screenshots to help explain your problem.

$ docker --version
Docker version 20.10.12, build e91ed57
$ docker-compose version
Docker Compose version v2.2.3

This is a fresh Docker Desktop install, these are the versions it came with.

I presume docker-compose.yml is supposed to be a version 1 definitiion (version was not required in version 1 was in version 2 but has now been deprecated), which is now deprecated according to Docker: "Version 1 (Deprecated)" (https://docs.docker.com/compose/compose-file/compose-versioning/). I wonder if it needs updating to a newer standard?

vsoch commented 2 years ago

It might be time to update then! And it's a bit annoying the newer versions don't support legacy files. Would you care to do a pull request with updates?

loz-hurst commented 2 years ago

Sure, it seems to be a simple as putting the existing docker-compose config under a services key in the yaml file. At least the command succeeded after I had done that - I'm not docker expert so there might be more tidying required in the future but at least that gets it running....

loz-hurst commented 2 years ago

Just FYI, I'm also getting a deprecation warning from the minio container but it's not fatal:

sregistry-minio-1      | WARNING: MINIO_ACCESS_KEY and MINIO_SECRET_KEY are deprecated.
sregistry-minio-1      |          Please use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD
vsoch commented 2 years ago

That should be fairly easy to update.

vsoch commented 2 years ago

Just a quick question - how did you install docker-compose? I just followed the instructions on the docker site for linux, and I got:

$ ./docker-compose-Linux-x86_64 --version
docker-compose version 1.29.2, build 5becea4c

So I'm wondering if it wouldn't be best to globally update all recipes, perhaps we should put them in a separate folder and add instructions to the docs for how to use given above a certain version?

vsoch commented 2 years ago

If you want me to do these changes (and push to your branch here) let me know - I can also fix the issue with the minio envars. I can't do it during the day but could do it during the evening.

cpeel commented 1 year ago

https://github.com/singularityhub/sregistry/pull/405 was merged, we should be able to close this issue.