buildkit more arg

pull/464/head
Kang Huaishuai 2020-09-06 08:52:31 +08:00
parent 6ceeec7f45
commit 90a7316322
No known key found for this signature in database
GPG Key ID: 5E515022F565DA09
3 changed files with 67 additions and 7 deletions

View File

@ -4,8 +4,6 @@
**使 Docker 18.09BuildKit 使使 BuildKit 使 Dockerfile Dockerfile.buildkit**
**docker-compose build BuildKit**
Docker Hub buildkit https://github.com/docker-practice/docker-hub-buildx
## `Dockerfile`
@ -147,6 +145,10 @@ $ ssh-add ~/.ssh/id_rsa
$ docker build -t test --ssh default=$SSH_AUTH_SOCK .
```
## docker-compose build 使 Buildkit
`COMPOSE_DOCKER_CLI_BUILD=1` 使
##
* https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/experimental.md

View File

@ -9,7 +9,7 @@
Docker for Linux `arm` Docker
```bash
$ docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
$ docker run --rm --privileged tonistiigi/binfmt:latest --install all
```
Docker `builder` `--platform` `builder` 使 [](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md) 的 [`dockerpracticesig/buildkit:master`](https://github.com/docker-practice/buildx) 镜像替换官方镜像。
@ -66,3 +66,61 @@ Linux buildkitsandbox 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 aarch6
$ docker run -it --rm myusername/hello
Linux buildkitsandbox 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 Linux
```
##
`Dockerfile`
**TARGETPLATFORM**
`linux/amd64`, `linux/arm/v7`, `windows/amd64`
**TARGETOS**
`TARGETPLATFORM` OS `linux`, `windows`
**TARGETARCH**
`TARGETPLATFORM` `amd64`, `arm`
**TARGETVARIANT**
`TARGETPLATFORM` `v7`
**BUILDPLATFORM**
`linux/amd64`
**BUILDOS**
`BUILDPLATFORM` OS `linux`
**BUILDARCH**
`BUILDPLATFORM` `amd64`
**BUILDVARIANT**
`BUILDPLATFORM` `v7`
### 使
`linux/arm/v7` `linux/amd64`
* bin/dist-linux-arm
* bin/dist-linux-amd64
`Dockerfile`
```bash
FROM scratch
# 使
ARG TARGETOS
ARG TARGETARCH
COPY bin/dist-${TARGETOS}-${TARGETARCH} /dist
ENTRYPOINT ["dist"]
```

View File

@ -60,10 +60,10 @@ $ sysctl --system
```bash
# ipvs
[Service]
ExecStartPre=-modprobe ip_vs
ExecStartPre=-modprobe ip_vs_rr
ExecStartPre=-modprobe ip_vs_wrr
ExecStartPre=-modprobe ip_vs_sh
ExecStartPre=-/sbin/modprobe ip_vs
ExecStartPre=-/sbin/modprobe ip_vs_rr
ExecStartPre=-/sbin/modprobe ip_vs_wrr
ExecStartPre=-/sbin/modprobe ip_vs_sh
```