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

Image Build Fails on Podman #1031

Closed
4 of 11 tasks
Alexhuszagh opened this issue Sep 27, 2022 · 2 comments · Fixed by #1033
Closed
4 of 11 tasks

Image Build Fails on Podman #1031

Alexhuszagh opened this issue Sep 27, 2022 · 2 comments · Fixed by #1033
Assignees
Labels
A-container-engine Area: container engines A-podman Area: podman container engine bug

Comments

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Sep 27, 2022

Checklist

Describe your issue

Currently, attempting to build an image for Podman fails, producing the following error:

$ cargo build-docker-image $target --engine podman                                                                                                                                                  
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/xtask build-docker-image aarch64-linux-android --engine podman`
[cross] note: Build aarch64-linux-android for x86_64-unknown-linux-gnu
Error: unable to parse value provided `` to --cache-from: invalid repo "type=registry,ref=ghcr.io/cross-rs/aarch64-linux-android:main": must contain registry and repository: invalid reference format
Error: 
   0: `podman buildx build --platform linux/amd64 --load --pull --cache-from 'type=registry,ref=ghcr.io/cross-rs/aarch64-linux-android:main' --tag ghcr.io/cross-rs/aarch64-linux-android:local --label 'org.cross-rs.for-cross-target=aarch64-linux-android' --label 'org.cross-rs.runs-with=x86_64-unknown-linux-gnu' -f /home/ahuszagh/git/cross/docker/Dockerfile.aarch64-linux-android --progress auto .` failed with exit status: 125

Location:
   /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/convert/mod.rs:55

What target(s) are you cross-compiling for?

aarch64-linux-android

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.4 (d92e563)

Additional information / notes

Removing the --cache-from step fixes the issue. We should probably also add a build image step for podman, using the fast image build (x86_64-unknown-linux-gnu) to avoid this issue in the future. The podman version is 4.2.0.

@Alexhuszagh Alexhuszagh added bug A-container-engine Area: container engines labels Sep 27, 2022
@Alexhuszagh Alexhuszagh self-assigned this Sep 27, 2022
@Alexhuszagh
Copy link
Contributor Author

It seems --cache-from only supports a repository using podman, and this might be true for other container engines. type=registry might be implicit. type=registry is the default for docker, so we should be able to omit it.

@Emilgardis
Copy link
Member

I don't think there is a situation where not being explicit about it is bad. Removing the explicitness sounds good 👍🏼

@bors bors bot closed this as completed in ab01c6e Sep 30, 2022
@Alexhuszagh Alexhuszagh added the A-podman Area: podman container engine label Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-container-engine Area: container engines A-podman Area: podman container engine bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants