Commit 2bc3d13
committed
cmd/run: Add --arch flag for container architecture selection
Add the --arch / -a flag to the run command, allowing users to run
commands inside cross-architecture containers by specifying the target
architecture (e.g., toolbox run --arch arm64 uname -m). Can be used
with flags --distro and --release, just as for container creation.
The flag value is resolved through resolveArchitectureID()
(added in [1]) and passed to resolveContainerAndImageNames()
(updated for cross-arch in [1]) so that it resolves to the
architecture-suffixed container name.
[1] containers#1786
containers#1789
Signed-off-by: Dalibor Kricka <dalidalk@seznam.cz>1 parent 90e5e66 commit 2bc3d13
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| |||
142 | 149 | | |
143 | 150 | | |
144 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
145 | 157 | | |
146 | 158 | | |
147 | 159 | | |
148 | 160 | | |
149 | 161 | | |
150 | | - | |
| 162 | + | |
151 | 163 | | |
152 | 164 | | |
153 | 165 | | |
| |||
0 commit comments