diff --git a/static/README.md b/static/README.md new file mode 100644 index 0000000000..ccdd4d91e4 --- /dev/null +++ b/static/README.md @@ -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 +```