|
1 | 1 | <!--toc:start--> |
| 2 | +- [Automatic Target Architecture on Debian](#automatic-target-architecture-on-debian) |
2 | 3 | - [Custom Images](#custom-images) |
3 | 4 | - [Adding Dependencies to Existing Images](#adding-dependencies-to-existing-images) |
4 | 5 | - [Custom Dockerfile](#custom-dockerfile) |
5 | 6 | - [Custom Image](#custom-image) |
6 | | -- [Automatic Target Architecture on Debian](#automatic-target-architecture-on-debian) |
7 | 7 | <!--toc:end--> |
8 | 8 |
|
| 9 | +# Automatic Target Architecture on Debian |
| 10 | + |
| 11 | +Custom images generated from config `dockerfile` or `pre-build` keys will |
| 12 | +export `CROSS_DEB_ARCH`, which allows you to install packages from |
| 13 | +Ubuntu/Debian repositories without having to specify the exact architecture. |
| 14 | +You can find an |
| 15 | +[example of this here](#adding-dependencies-to-existing-images). |
| 16 | + |
| 17 | + |
9 | 18 | # Custom Images |
10 | 19 |
|
11 | 20 | `cross` provides default Docker images for the targets listed [in the |
@@ -75,24 +84,6 @@ default one. Normal Docker behavior applies, so: |
75 | 84 | - If only `tag` is omitted, then Docker will use the `latest` tag. |
76 | 85 |
|
77 | 86 |
|
78 | | -# Automatic Target Architecture on Debian |
79 | | - |
80 | | -Custom images generated from config `dockerfile` or `pre-build` keys will |
81 | | -export `CROSS_DEB_ARCH`, which allows you to install packages from |
82 | | -Ubuntu/Debian repositories without having to specify the exact architecture. |
83 | | -For example, to install `OpenSSL` for the target, you can do: |
84 | | - |
85 | | -```toml |
86 | | -[target.aarch64-unknown-linux-gnu] |
87 | | -pre-build = [ |
88 | | - "dpkg --add-architecture $CROSS_DEB_ARCH", |
89 | | - "apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH" |
90 | | -] |
91 | | -``` |
92 | | - |
93 | | -Here, `CROSS_DEB_ARCH` will automatically evaluate to `arm64`, without you |
94 | | -having to explicitly provide it. |
95 | | - |
96 | 87 |
|
97 | 88 | [config-target-pre-build]: ./config.md#targettargetpre-build |
98 | 89 | [config_target_dockerfile]: ./config.md#targettargetdockerfile |
|
0 commit comments