According to the wikiCROSS_CONTAINER_OPTS should only be added $engine run commands:
CROSS_CONTAINER_OPTS: Additional arguments to provide to the container engine during $engine run (example: --env MYVAR=1 where engine=docker).
However when using CROSS_REMOTE the options are also added to a $engine exec command.
This is problematic when the options only can be used with $engine run. For instance I would like to use docker run --net=host when building.
Possible solutions:
CROSS_CONTAINER_OPTS should only apply to $engine run commands as currently documented in the wiki.
CROSS_CONTAINER_OPTS should apply to both $engine run and $engine exec. The wiki should be updated to reflect this. Furthermore a CROSS_CONTAINER_RUN_OPTS environment variable should be supported that only gets passed to $engine run.
What target(s) are you cross-compiling for?
No response
Which operating system is the host (e.g computer cross is on) running?
[ ] macOS
[ ] Windows
[X] Linux / BSD
[ ] other OS (specify in description)
What architecture is the host?
[X] x86_64 / AMD64
[ ] arm32
[ ] arm64 (including Mac M1)
What container engine is cross using?
[X] docker
[ ] podman
[ ] other container engine (specify in description)
Checklist
Describe your issue
According to the wiki
CROSS_CONTAINER_OPTS
should only be added$engine run
commands:CROSS_CONTAINER_OPTS
: Additional arguments to provide to the container engine during$engine run
(example:--env MYVAR=1
whereengine=docker
).However when using
CROSS_REMOTE
the options are also added to a$engine exec
command.This is problematic when the options only can be used with
$engine run
. For instance I would like to usedocker run --net=host
when building.Possible solutions:
CROSS_CONTAINER_OPTS
should only apply to$engine run
commands as currently documented in the wiki.CROSS_CONTAINER_OPTS
should apply to both$engine run
and$engine exec
. The wiki should be updated to reflect this. Furthermore aCROSS_CONTAINER_RUN_OPTS
environment variable should be supported that only gets passed to$engine run
.What target(s) are you cross-compiling for?
No response
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.5
Example
Additional information / notes
No response