Skip to content

Commit

Permalink
static: add readme
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Mar 30, 2022
1 parent 059e8f9 commit 950306c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions static/README.md
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
```

0 comments on commit 950306c

Please sign in to comment.