Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The example to create a custom Docker image doesn't work #649

Closed
guihkx opened this issue Mar 14, 2022 · 12 comments
Closed

The example to create a custom Docker image doesn't work #649

guihkx opened this issue Mar 14, 2022 · 12 comments

Comments

@guihkx
Copy link
Contributor

guihkx commented Mar 14, 2022

Trying to follow this section from the README yields me this:

$ docker build -t test .
Sending build context to Docker daemon  231.4kB
Step 1/2 : FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:latest
unauthorized

The error message seems a bit odd to me (though I'm still learning Docker), considering that I've already authenticated myself and other images (such asghcr.io/rse-ops/gcc-ubuntu-20.04:gcc-7.3.0 ) are downloaded just fine.

Any help is appreciated, thanks.

@reitermarkus
Copy link
Member

We just migrated to GHCR and there has not yet been a stable release yet, so there is no latest tag for this image yet.

You can try ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main instead.

@Emilgardis
Copy link
Member

actually, we forgot to make them public :)

@Emilgardis
Copy link
Member

Made aarch64-unknown-linux-gnu public now, let us know if it works better now, use the main or edge tag for now

@guihkx
Copy link
Contributor Author

guihkx commented Mar 14, 2022

Oh, that explains it 😄

(Side: @reitermarkus using that URL didn't work either, but as pointed out by @Emilgardis , I suppose it's due to it no being public, so I'll just wait)

Thanks guys

@reitermarkus
Copy link
Member

reitermarkus commented Mar 14, 2022

I assume we can make them public by default using some label since the ones which are private show Label: Private.

@guihkx
Copy link
Contributor Author

guihkx commented Mar 14, 2022

Thank you very much @Emilgardis, it does work now using themain tag.

This is a bit awkward though, I was actually more interested in the x86_64-unknown-linux-gnu image because I want to compile my program using an old glibc version than I have on my personal machine, so if you could make that public also... 😁

I'm only interested in having a custom image because one of the dependencies of this Rust program calls python3 in the build process for some reason.

@Emilgardis
Copy link
Member

Emilgardis commented Mar 14, 2022

We can make them public by default by not enabling private packages, I'll do that soon when I'm done with changing all of them

@Emilgardis
Copy link
Member

Emilgardis commented Mar 14, 2022

Doesn't seem like it's possible to disable private packages, if we add new packages we'll have to make sure to change them into public packages/images

Configuring visibility of container images for your personal account

When you first publish a package, the default visibility is private and only you can see the package. You can modify a private or public container image's access by changing the access settings.

@detly
Copy link

detly commented May 2, 2022

Is this why I get:

⚬ docker pull ghcr.io/cross-rs/aarch64-unknown-linux-gnu
Using default tag: latest
Error response from daemon: manifest unknown

Or is that something else entirely?

@detly
Copy link

detly commented May 2, 2022

Things I have tried:

  1. Making a custom image for cross using the instructions in the README. Failed because the instructions say to use ghcr.io/cross-rs/x86_64-unknown-linux-musl:latest image, which doesn't seem to exist
  2. They do exist with the tag :main, but don't have dpkg or apt-get (??)
  3. It worked when I based the image on rustembedded/cross:x86_64-unknown-linux-musl

@detly detly mentioned this issue May 2, 2022
@Emilgardis
Copy link
Member

We've switched to centos for now in x86_64-unkown-linux-gnu, see #680 for switching back. Long story short, apt and dpkg is not available because its not debian/ubuntu anymore. The instructions are for aarch64 so it uses debian. use yum on centos

@Emilgardis
Copy link
Member

Emilgardis commented May 3, 2022

Rereading your message @detly I see I missed the fact you're trying to use the musl image, the musl image do have apt installed, so the only thing you'd need to do is figure out why you can use them.

$ docker run --rm -it ghcr.io/cross-rs/x86_64-unknown-linux-musl:edge apt-get -v
apt 2.0.6 (amd64)

edit: if you need more help, open a new issue or discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants