Skip to content

Conversation

macabu
Copy link
Contributor

@macabu macabu commented Aug 22, 2024

As part of the effort to be able to build moby/moby in Docker-in-Docker fashion for linux/riscv64 natively, it requires this image to be build so as well.

Dependency from https://github.com/moby/moby/blob/master/Dockerfile#L95

I've been able to build and do a basic run of the binary in my riscv64 host:

user@bananapif3:~/Projects/distribution$ file bin/registry
bin/registry: ELF 64-bit LSB pie executable, UCB RISC-V, RVC, double-float ABI, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, BuildID[sha1]=3997fd5e706d3525b975f50f4badaa70e515c348, for GNU/Linux 4.15.0, stripped

user@bananapif3:~/Projects/distribution$ ./bin/registry --version
./bin/registry github.com/distribution/distribution/v3 v3.0.0-beta.1.m+unknown

user@bananapif3:~/Projects/distribution$ ./bin/registry serve cmd/registry/config-dev.yml
DEBU[0000] using "text" logging formatter
WARN[0000] No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable.  environment=development go.version=go1.22.6 instance.id=dc6db002-071b-403c-8ae9-998ecfec42db service=registry version=v3.0.0-beta.1.m+unknown
INFO[0000] redis not configured                          environment=development go.version=go1.22.6 instance.id=dc6db002-071b-403c-8ae9-998ecfec42db service=registry version=v3.0.0-beta.1.m+unknown
INFO[0000] using inmemory blob descriptor cache          environment=development go.version=go1.22.6 instance.id=dc6db002-071b-403c-8ae9-998ecfec42db service=registry version=v3.0.0-beta.1.m+unknown
INFO[0000] providing prometheus metrics on /metrics
INFO[0000] listening on [::]:5000                        environment=development go.version=go1.22.6 instance.id=dc6db002-071b-403c-8ae9-998ecfec42db service=registry version=v3.0.0-beta.1.m+unknown
INFO[0000] debug server listening :5001

Signed-off-by: Matheus Macabu <macabu.matheus@gmail.com>
Copy link
Member

@milosgajdos milosgajdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has RISC-V support in Go been marked as stable? I don't develop for that platform so I'm curious.

@macabu
Copy link
Contributor Author

macabu commented Aug 23, 2024

Has RISC-V support in Go been marked as stable? I don't develop for that platform so I'm curious.

To be honest I don't know if the Go team has such a thing as different support "tiers". RISC-V target is recent (from Go 1.21.0), but in my experience building a bunch of different projects, I haven't had any weird compiler error, crash, or misbehaving as far as my tests went.

@milosgajdos
Copy link
Member

It's not so much about "support tiers" as it is about Go runtime support. It seems though that it's more or less "covered" https://groups.google.com/g/golang-nuts/c/m4OF6nieGro

Copy link
Member

@milosgajdos milosgajdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine so LGTM, but let's see what other maintainers say :)

PTAL @thaJeztah

@milosgajdos milosgajdos requested a review from thaJeztah August 23, 2024 13:25
@macabu
Copy link
Contributor Author

macabu commented Aug 23, 2024

It's not so much about "support tiers" as it is about Go runtime support. It seems though that it's more or less "covered" https://groups.google.com/g/golang-nuts/c/m4OF6nieGro

Thanks for linking it, I wasn't aware 🙇

@milosgajdos milosgajdos requested review from Jamstah and squizzi August 27, 2024 19:50
@milosgajdos milosgajdos merged commit 6e56b3a into distribution:main Aug 28, 2024
16 checks passed
@thaJeztah
Copy link
Member

FWIW; if the intent is to also have riscv variants in the official image, then changes are probably also needed in https://github.com/distribution/distribution-library-image and https://github.com/docker-library/official-images/blob/fb18daaa4388ddc39121d22701d9c0e266c61e27/library/registry

@milosgajdos
Copy link
Member

Of course. It'll be done. At some point.

@macabu
Copy link
Contributor Author

macabu commented Aug 28, 2024

Let me know and I can test it! Would this make the cut for 3.0 or later?

milosgajdos added a commit to milosgajdos/distribution-library-image that referenced this pull request Nov 7, 2024
The only notable change is the addition of riscv plaform.
See: distribution/distribution#4444

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants