-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: CrazyMax <[email protected]>
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Building your own Docker static package | ||
|
||
Static packages can be built from this directory with the following syntax | ||
|
||
```shell | ||
make static-${TARGETOS}-${TARGETARCH}-${TARGETVARIANT} | ||
``` | ||
|
||
Format of `TARGETOS`, `TARGETARCH`, `TARGETVARIANT` is the same as the [platform ARGs in the global scope](https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope) | ||
for a Dockerfile like `static-linux-arm-v7`. | ||
|
||
Artifacts will be located in `build` under the following directory structure: | ||
`build/$os/$arch/$variant/` or `build/$os/$arch/` if there is no variant being | ||
used. | ||
|
||
### Building from local source | ||
|
||
Specify the location of the source repositories for the engine and cli when | ||
building packages | ||
|
||
* `ENGINE_DIR` -> Specifies the directory where the engine code is located, eg: `$GOPATH/src/github.com/docker/docker` | ||
* `CLI_DIR` -> Specifies the directory where the cli code is located, eg: `$GOPATH/src/github.com/docker/cli` | ||
|
||
```shell | ||
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli static-linux-amd64 | ||
``` | ||
|
||
## Supported platforms | ||
|
||
Here is a list of platforms that are currently supported: | ||
|
||
```shell | ||
make static-linux-amd64 | ||
make static-linux-arm-v6 | ||
make static-linux-arm-v7 | ||
make static-linux-arm64 | ||
make static-darwin-amd64 | ||
make static-darwin-arm64 | ||
make static-windows-amd64 | ||
make static-windows-arm64 | ||
``` | ||
|
||
> note: `darwin` only packages the docker cli and plugins. | ||
But you can test building against whatever platform you want like: | ||
|
||
```shell | ||
make static-linux-riscv64 | ||
make static-linux-s390x | ||
``` |