-
Notifications
You must be signed in to change notification settings - Fork 394
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
when pre-building custom docker image inside docker container cross uses weird path #993
Comments
Hi! Are you sure you need container in container? Sounds to me like you don't need it. The container that cross is invoked in with This could be a XY problem, what are you trying to do? |
So I build custom docker image containing both rust and flutter. So I thought I have to use So my docker image includes:
I have to build rust part using cross with following cross config:
|
are the rust binaries added to i.e, can you yourself run |
Yes I can |
Btw, I noticed I had added |
you only need to rustup install with I think I know the issue though (for the path thing), we're not correctly identifying/pathing the target folder, should be an easy fix unsure why cargo is not found |
Here is docker image that I use:
It is a bit of mess, but you can see that I copy |
so what should be a correct way to invoke cross when running within container? I think I used it fine without |
Enabling verbose I noticed how it runs image:
It seems to execute |
Yes, because we mount rust and family inside this container. That's how cross works basically. In the omitted <options...> there should be a |
yes, it does mount Which on my docker image is:
but it doesn't use its content:
Notice how P.s. I cannot really test it because on windows docker permissions are broken
In fact all folders are mounted without any files... So I guess it is docker bug? |
can you try using this attached binary for cross cross-x86_64-unknown-linux-gnu.zip make sure to |
@Emilgardis with your PR and Just for reference it correctly mounts directories
|
awesome! |
I assume we can disregard case of |
Yes, I think so, it could be a real issue but for now it should be fine. |
Ok, thank you. |
the cargo not found issue is #728, we're not able to fix it easily |
Hm in my case I don't run docker within WSL, but I do use WSL as backend though so maybe it is related |
Checklist
Describe your issue
When building with
CROSS_CONTAINER_IN_CONTAINER=true
pre-building uses weird path e.g.:While
CROSS_CONTAINER_IN_CONTAINER=false
would avoid this problem using file system inside docker as it is, in my case it is/mount/core
, but it makes me unable to build due to missingcargo
, not sure why exactly:The way I start docker image:
It seems it only happens because I mounted this directory, but this is honestly not good idea.
It should use mounted folder, not trying to pick source by inspecting docker contaier and checking the mount
It is probably not going to be a problem inside github actions where I intend to use it, but this is basically unusable when I do local test
What target(s) are you cross-compiling for?
aarch64-unknown-linux-gnu
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.4 (4645d93 2022-07-10)
Example
No response
Additional information / notes
No response
The text was updated successfully, but these errors were encountered: