Skip to content

Commit 950306c

Browse files
committed
static: add readme
Signed-off-by: CrazyMax <[email protected]>
1 parent 059e8f9 commit 950306c

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

static/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Building your own Docker static package
2+
3+
Static packages can be built from this directory with the following syntax
4+
5+
```shell
6+
make static-${TARGETOS}-${TARGETARCH}-${TARGETVARIANT}
7+
```
8+
9+
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)
10+
for a Dockerfile like `static-linux-arm-v7`.
11+
12+
Artifacts will be located in `build` under the following directory structure:
13+
`build/$os/$arch/$variant/` or `build/$os/$arch/` if there is no variant being
14+
used.
15+
16+
### Building from local source
17+
18+
Specify the location of the source repositories for the engine and cli when
19+
building packages
20+
21+
* `ENGINE_DIR` -> Specifies the directory where the engine code is located, eg: `$GOPATH/src/github.com/docker/docker`
22+
* `CLI_DIR` -> Specifies the directory where the cli code is located, eg: `$GOPATH/src/github.com/docker/cli`
23+
24+
```shell
25+
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli static-linux-amd64
26+
```
27+
28+
## Supported platforms
29+
30+
Here is a list of platforms that are currently supported:
31+
32+
```shell
33+
make static-linux-amd64
34+
make static-linux-arm-v6
35+
make static-linux-arm-v7
36+
make static-linux-arm64
37+
make static-darwin-amd64
38+
make static-darwin-arm64
39+
make static-windows-amd64
40+
make static-windows-arm64
41+
```
42+
43+
> note: `darwin` only packages the docker cli and plugins.
44+
45+
But you can test building against whatever platform you want like:
46+
47+
```shell
48+
make static-linux-riscv64
49+
make static-linux-s390x
50+
```

0 commit comments

Comments
 (0)