Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi arch docker build #1203

Merged
merged 1 commit into from
Oct 12, 2020
Merged

Multi arch docker build #1203

merged 1 commit into from
Oct 12, 2020

Conversation

morlay
Copy link
Contributor

@morlay morlay commented Sep 21, 2020

I maintained a multi arch images for istio stack https://github.com/querycap/istio
since istio-operator deprecated addonComponents, need jaeger-operator support muti arch.

- uses: actions/checkout@v1
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup multi arch build env

fi
fi

echo "Building with tags ${IMAGE_TAGS}"
docker buildx build --build-arg=GOPROXY=${GOPROXY} --platform=linux/amd64,linux/arm64 ${IMAGE_TAGS} --file build/Dockerfile .
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker buildx could build once and push with multi tags.

so just change here to concat --tag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if podman/buildah support this? If so, might be a good idea to try them out instead, as they generally work better in CI environments.

Copy link
Contributor

@jpkrohling jpkrohling Sep 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it doesn't, and I also can't seem to be able to get the regular Docker to work:

$ docker version
Client: Docker Engine - Community
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46d9d
 Built:             Wed Sep 16 17:03:54 2020
 OS/Arch:           linux/amd64
 Experimental:      false

$ docker buildx build --build-arg=GOPROXY=${GOPROXY} --platform=linux/amd64,linux/arm64 ${IMAGE_TAGS} --file build/Dockerfile .
unknown flag: --build-arg
See 'docker --help'.

$ docker buildx build --platform=linux/amd64,linux/arm64 ${IMAGE_TAGS} --file build/Dockerfile .
unknown flag: --platform
See 'docker --help'.

EDIT: looks like buildah can indeed build arch-specific images, one at a time: buildah bud --platform=linux/amd64 ${IMAGE_TAGS} --file build/Dockerfile .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildah seem not ready for multi arch build. containers/buildah#1590

local buildx setup could see https://github.com/docker/buildx#with-buildx-or-docker-1903

$ export DOCKER_BUILDKIT=1
$ docker build --platform=local -o . git://github.com/docker/buildx
$ mkdir -p ~/.docker/cli-plugins
$ mv buildx ~/.docker/cli-plugins/docker-buildx

Copy link
Contributor Author

@morlay morlay Sep 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or just download binary from https://github.com/docker/buildx/releases
into ~/.docker/cli-plugins/docker-buildx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. in old way. this why docker team provide the buildkit.
in docker registry hub, with /v2 apis. the oci image have a manifest wrap to store arch infos.

Copy link
Contributor Author

@morlay morlay Sep 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or use docker manifest create (with ~/.docker/config.json experimental: enabled) to merge them (version with arch suffix) together https://docs.docker.com/engine/reference/commandline/manifest/#create-and-push-a-manifest-list

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still unable to get it working. We'll probably need step-by-step instructions added to the CONTRIBUTING.md. Here's what I'm getting:

$ /usr/bin/docker buildx build --platform=linux/amd64,linux/arm64 --tag quay.io/jpkroehling/jaeger-operator:v1.19.0-15-g4e2c8b9f --file build/Dockerfile .
WARN[0000] invalid non-bool value for BUILDX_NO_DEFAULT_LOAD:  
multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")

$ /usr/bin/docker buildx create --use
sleepy_shaw

$ /usr/bin/docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag your-username/multiarch-example:buildx-latest . 
WARN[0000] invalid non-bool value for BUILDX_NO_DEFAULT_LOAD:  
WARN[0000] No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load 
[+] Building 6.1s (1/1) FINISHED                                                                                                                                                                                                              
 => ERROR [internal] booting buildkit                                                                                                                                                                                                    6.1s
 => => pulling image moby/buildkit:buildx-stable-1                                                                                                                                                                                       5.7s
 => => creating container buildx_buildkit_sleepy_shaw0                                                                                                                                                                                   0.4s
------
 > [internal] booting buildkit:
------
Error response from daemon: cgroups: cgroup mountpoint does not exist: unknown

Copy link
Contributor Author

@morlay morlay Sep 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's check step by step

$ docker buildx create --use --name localbuilder
$ docker buildx inspect localbuilder --bootstrap

[+] Building 13.7s (1/1) FINISHED                                                                                                                 
 => [internal] booting buildkit                                                                                                             13.7s
 => => pulling image moby/buildkit:buildx-stable-1                                                                                          12.7s
 => => creating container buildx_buildkit_localbuilder0                                                                                      1.0s
Name:   localbuilder
Driver: docker-container

Nodes:
Name:      localbuilder0
Endpoint:  unix:///var/run/docker.sock
Status:    running
Platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6

it should output like above. What your script output?

and could you mind to print uname -a ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems issue of docker.
docker/for-linux#219 (comment)

Makefile Show resolved Hide resolved
build/Dockerfile Outdated

COPY . /go/src/github.com/jaegertracing/jaeger-operator/
WORKDIR /go/src/github.com/jaegertracing/jaeger-operator
RUN make install-tools build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch go build in docker with multi stage build for different platform

@codecov
Copy link

codecov bot commented Sep 21, 2020

Codecov Report

Merging #1203 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1203   +/-   ##
=======================================
  Coverage   87.34%   87.34%           
=======================================
  Files          90       90           
  Lines        4900     4900           
=======================================
  Hits         4280     4280           
  Misses        457      457           
  Partials      163      163           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 729d8aa...866eb7f. Read the comment docs.

Makefile Show resolved Hide resolved
jpkrohling
jpkrohling previously approved these changes Sep 21, 2020
Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really nice, I just need to try it out manually before merging.

fi
fi

echo "Building with tags ${IMAGE_TAGS}"
docker buildx build --build-arg=GOPROXY=${GOPROXY} --platform=linux/amd64,linux/arm64 ${IMAGE_TAGS} --file build/Dockerfile .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if podman/buildah support this? If so, might be a good idea to try them out instead, as they generally work better in CI environments.

@jpkrohling
Copy link
Contributor

I'll try this one out first thing tomorrow. Really want this to work :-)

@morlay
Copy link
Contributor Author

morlay commented Sep 22, 2020

@jpkrohling i upgrade makefile to expose gobuild for speeding up in docker build. format is not necessary in this stage.

here is an example https://hub.docker.com/r/querycapistio/jaeger-operator/tags
for local build.

# after buildx installed, need create a builder once.
$ docker buildx create --use --name localbuild

$ docker buildx inspect localbuild
Name:   localbuild
Driver: docker-container

Nodes:
Name:      localbuild0
Endpoint:  unix:///var/run/docker.sock
Status:    running
Platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6

# if  Platforms without linux/arm64, could run
# https://github.com/tonistiigi/binfmt#installing-emulators
$ docker run --privileged --rm tonistiigi/binfmt --install all

# then do the build
$ OPERATOR_VERSION=1.19.0 BASE_BUILD_IMAGE=querycapistio/jaeger-operator ./.ci/publish-images.sh

@jpkrohling jpkrohling dismissed their stale review September 22, 2020 08:55

Dismissing, as we need instructions on the contributing guide

@xunholy
Copy link

xunholy commented Sep 28, 2020

@jpkrohling any ETA on when we might expect multi-arch images become available? This PR looks great btw @morlay!

@jpkrohling
Copy link
Contributor

While the code in this PR might work, it's still missing the instructions to the contributing guide. I myself still can't get it to work, for instance. Without clear and documented instructions, we people (including me) can't know if the problem is on me, or in the tool.

@morlay
Copy link
Contributor Author

morlay commented Sep 29, 2020

@jpkrohling
have you check this docker/for-linux#219 (comment)

i need your feedback for system info uname -a.
it is environment's issue not shell's.

i tested it in my env

$ uname -a
Linux arm-build 4.15.0-70-generic #79-Ubuntu SMP Tue Nov 12 10:36:10 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

$ docker info
Client: Docker Engine - Community
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46
 Built:             Wed Sep 16 17:03:14 2020
 OS/Arch:           linux/arm64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.13
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       4484c46
  Built:            Wed Sep 16 17:01:45 2020
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.3.7
  GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

should got the why that cause, then i could updates the docs.

somethings failed jaegertracing/jaeger#2325.
i updated travis system jaeger of too jaegertracing/jaeger#2334

@jpkrohling
Copy link
Contributor

I just ran the mkdir/mount to address the cgroups problem, but I still can't move forward:

$ /usr/bin/docker buildx build --platform=linux/amd64,linux/arm64 --tag quay.io/jpkroehling/jaeger-operator:v1.19.0-15-g4e2c8b9f --file build/Dockerfile .
WARN[0000] invalid non-bool value for BUILDX_NO_DEFAULT_LOAD:  
WARN[0000] No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load 
[+] Building 25.1s (9/15)                                                                                                                                                                                                                     
 => [internal] load .dockerignore                                                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 938B                                                                                                                                                                                                     0.0s
 => ERROR [linux/arm64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                           15.0s
 => ERROR [linux/amd64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                           15.0s
 => ERROR [linux/amd64 internal] load metadata for docker.io/library/golang:1.14                                                                                                                                                        25.0s
 => ERROR [linux/arm64 internal] load metadata for docker.io/library/golang:1.14                                                                                                                                                        25.0s
 => CANCELED [linux/amd64 builder 1/4] FROM docker.io/library/golang:1.14                                                                                                                                                                0.0s
 => => resolve docker.io/library/golang:1.14                                                                                                                                                                                             0.0s
 => [internal] load build context                                                                                                                                                                                                        0.0s
 => CANCELED [linux/amd64 stage-1 1/4] FROM registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                   0.0s
 => => resolve registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                                                0.0s
------
 > [linux/arm64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest:
------
------
 > [linux/amd64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest:
------
------
 > [linux/amd64 internal] load metadata for docker.io/library/golang:1.14:
------
------
 > [linux/arm64 internal] load metadata for docker.io/library/golang:1.14:
------
failed to solve: rpc error: code = Unknown desc = failed to load LLB: runtime execution on platform linux/arm64 not supported

$ uname -a
Linux guarana 5.8.11-200.fc32.x86_64 #1 SMP Wed Sep 23 13:51:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

@morlay
Copy link
Contributor Author

morlay commented Sep 29, 2020

@jpkrohling

Cool. seems issue of docker is fixed.

Then run qemu install before docker buildx, the images could be build.

# install qemu for arm64
$ docker run --privileged --rm tonistiigi/binfmt --install arm64

# after your testing, you could uninstall it by 
$ docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64

see more https://github.com/tonistiigi/binfmt (which is used in workflow action docker/setup-qemu-action@v1)

@jpkrohling
Copy link
Contributor

Something is still failing for me:

$ docker run --privileged --rm tonistiigi/binfmt --install arm64
Trying to pull registry.fedoraproject.org/tonistiigi/binfmt...
  manifest unknown: manifest unknown
Trying to pull registry.access.redhat.com/tonistiigi/binfmt...
  name unknown: Repo not found
Trying to pull registry.centos.org/tonistiigi/binfmt...
  manifest unknown: manifest unknown
Trying to pull docker.io/tonistiigi/binfmt...
Getting image source signatures
Copying blob b78aa434a304 done  
Copying blob 9cc57093ca8c done  
Copying config 1659b2bb4c done  
Writing manifest to image destination
Storing signatures
2020/09/30 12:42:20 error: operation not permitted
cannot mount binfmt_misc filesystem at /proc/sys/fs/binfmt_misc
main.run
	/src/cmd/binfmt/main.go:146
main.main
	/src/cmd/binfmt/main.go:139
runtime.main
	/usr/local/go/src/runtime/proc.go:203
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1373

@morlay
Copy link
Contributor Author

morlay commented Sep 30, 2020

may with sudo. permission issue.

@jpkrohling
Copy link
Contributor

We'll get there some day, bear with me :-)

$ sudo docker run --privileged --rm tonistiigi/binfmt --install arm64
Unable to find image 'tonistiigi/binfmt:latest' locally
latest: Pulling from tonistiigi/binfmt
9cc57093ca8c: Pull complete 
b78aa434a304: Pull complete 
Digest: sha256:df15403e06a03c2f461c1f7938b171fda34a5849eb63a70e2a2109ed5a778bde
Status: Downloaded newer image for tonistiigi/binfmt:latest
2020/10/01 08:18:04 installing: arm64 OK
{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/386"
  ],
  "emulators": [
    "qemu-aarch64"
  ]
}

$ sudo docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64

2020/10/01 08:18:13 uninstalling: qemu-aarch64 OK
{
  "supported": [
    "linux/amd64",
    "linux/386"
  ],
  "emulators": null
}

$ /usr/bin/docker buildx build --platform=linux/amd64,linux/arm64 --tag quay.io/jpkroehling/jaeger-operator:v1.20.0-1 --file build/Dockerfile .
WARN[0000] invalid non-bool value for BUILDX_NO_DEFAULT_LOAD:  
WARN[0000] No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load 
[+] Building 15.1s (6/9)                                                                                                                                                                                                                      
 => [internal] load build definition from Dockerfile                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 91B                                                                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                                          0.0s
 => ERROR [linux/arm64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                           15.0s
 => ERROR [linux/amd64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                           15.0s
 => CANCELED [internal] load build context                                                                                                                                                                                               0.0s
 => => transferring context:                                                                                                                                                                                                             0.0s
 => CANCELED [linux/amd64 1/4] FROM registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                           0.0s
 => => resolve registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                                                0.0s
------
 > [linux/arm64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest:
------
------
 > [linux/amd64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest:
------
failed to solve: rpc error: code = Unknown desc = failed to load LLB: runtime execution on platform linux/arm64 not supported

@morlay
Copy link
Contributor Author

morlay commented Oct 2, 2020

the secord step for uninstalling of qemu need to do after docker build 😂

@jpkrohling
Copy link
Contributor

Ouch, I should have paid more attention :-)

In any case, here's the current state:

$ sudo mkdir /sys/fs/cgroup/systemd
$ sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
$ sudo docker run --privileged --rm tonistiigi/binfmt --install arm64
2020/10/02 09:00:00 installing: arm64 OK
{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/386"
  ],
  "emulators": [
    "qemu-aarch64"
  ]
}
$ /usr/bin/docker buildx build --platform=linux/amd64,linux/arm64 --tag quay.io/jpkroehling/jaeger-operator:v1.20.0-1 --file build/Dockerfile .
WARN[0000] invalid non-bool value for BUILDX_NO_DEFAULT_LOAD:  
WARN[0000] No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load 
[+] Building 41.9s (11/23)                                                                                                                                                                                                                    
 => [internal] load build definition from Dockerfile                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 91B                                                                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                                          0.0s
 => ERROR [linux/arm64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                           16.8s
 => ERROR [linux/amd64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                           16.8s
 => ERROR [linux/arm64 internal] load metadata for docker.io/library/golang:1.14                                                                                                                                                         6.8s
 => ERROR [linux/amd64 internal] load metadata for docker.io/library/golang:1.14                                                                                                                                                         6.8s
 => CANCELED [linux/arm64 stage-1 1/4] FROM registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                  25.0s
 => => resolve registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                                               25.0s
 => ERROR [linux/arm64 builder 1/4] FROM docker.io/library/golang:1.14                                                                                                                                                                  25.0s
 => => resolve docker.io/library/golang:1.14                                                                                                                                                                                            25.0s
 => [internal] load build context                                                                                                                                                                                                        0.0s
 => CANCELED [linux/amd64 stage-1 1/4] FROM registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                  25.0s
 => => resolve registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                                               25.0s
 => ERROR [linux/amd64 builder 1/4] FROM docker.io/library/golang:1.14                                                                                                                                                                  25.0s
 => => resolve docker.io/library/golang:1.14                                                                                                                                                                                            25.0s
------
 > [linux/arm64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest:
------
------
 > [linux/amd64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest:
------
------
 > [linux/arm64 internal] load metadata for docker.io/library/golang:1.14:
------
------
 > [linux/amd64 internal] load metadata for docker.io/library/golang:1.14:
------
------
 > [linux/arm64 builder 1/4] FROM docker.io/library/golang:1.14:
------
------
 > [linux/amd64 builder 1/4] FROM docker.io/library/golang:1.14:
------
failed to solve: rpc error: code = Unknown desc = failed to load cache key: failed to do request: Head https://registry-1.docker.io/v2/library/golang/manifests/1.14: dial tcp: lookup registry-1.docker.io on 8.8.4.4:53: read udp 172.17.0.2:36941->8.8.4.4:53: i/o timeout

This sounds like a temporary failure, so, I'll try it out later, but looks promising!

@jpkrohling
Copy link
Contributor

jpkrohling commented Oct 2, 2020

The problem above wasn't a temporary resolution failure, as I could resolve it with dig. Looks like yet another Docker networking issue, and apparently, I had to add a firewalld option to get it working. In the end, here's what worked:

$ sudo mkdir /sys/fs/cgroup/systemd
$ sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
$ sudo firewall-cmd --add-masquerade --permanent
$ sudo firewall-cmd --reload
$ sudo systemctl restart firewalld

$ sudo docker run --privileged --rm tonistiigi/binfmt --install arm64
2020/10/02 09:00:00 installing: arm64 OK
{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/386"
  ],
  "emulators": [
    "qemu-aarch64"
  ]
}

$ /usr/bin/docker buildx build --platform=linux/amd64,linux/arm64 --tag quay.io/jpkroehling/jaeger-operator:v1.20.0-1 --file build/Dockerfile .
WARN[0000] invalid non-bool value for BUILDX_NO_DEFAULT_LOAD:  
WARN[0000] No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load 
[+] Building 279.5s (23/23) FINISHED                                                                                                                                                                                                          
 => [internal] load .dockerignore                                                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 91B                                                                                                                                                                                                      0.0s
 => [linux/arm64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                  5.0s
 => [linux/amd64 internal] load metadata for docker.io/library/golang:1.14                                                                                                                                                               4.3s
 => [linux/amd64 internal] load metadata for registry.access.redhat.com/ubi8/ubi:latest                                                                                                                                                  3.4s
 => [linux/arm64 internal] load metadata for docker.io/library/golang:1.14                                                                                                                                                               5.3s
 => [linux/amd64 stage-1 1/4] FROM registry.access.redhat.com/ubi8/ubi@sha256:d748c21a55796827da82c61f162b505c59451cba24f1874e5185f21275b6bddc                                                                                          49.4s
 => => resolve registry.access.redhat.com/ubi8/ubi@sha256:d748c21a55796827da82c61f162b505c59451cba24f1874e5185f21275b6bddc                                                                                                               0.0s
 => => sha256:c4d668e229cd131e0a8e4f8218dca628d9cf9697572875e355fe4b247b6aa9f0 1.79kB / 1.79kB                                                                                                                                           0.3s
 => => sha256:ecbc6f53bba0d1923ca9e92b3f747da8353a070fccbae93625bd8b47dbee772e 4.37kB / 4.37kB                                                                                                                                           0.0s
 => => sha256:ec1681b6a383e4ecedbeddd5abc596f3de835aed6db39a735f62395c8edbff30 73.86MB / 73.86MB                                                                                                                                        46.8s
 => => sha256:d748c21a55796827da82c61f162b505c59451cba24f1874e5185f21275b6bddc 1.47kB / 1.47kB                                                                                                                                           0.0s
 => => sha256:3ce39afb014c36f0a285cd832d6722733eea40385e2c53bfeb9d6121ba6a940e 737B / 737B                                                                                                                                               0.0s
 => => unpacking registry.access.redhat.com/ubi8/ubi@sha256:d748c21a55796827da82c61f162b505c59451cba24f1874e5185f21275b6bddc                                                                                                             2.4s
 => [internal] load build context                                                                                                                                                                                                        1.0s
 => => transferring context: 181.13MB                                                                                                                                                                                                    0.9s
 => [linux/arm64 stage-1 1/4] FROM registry.access.redhat.com/ubi8/ubi@sha256:d748c21a55796827da82c61f162b505c59451cba24f1874e5185f21275b6bddc                                                                                          58.7s
 => => resolve registry.access.redhat.com/ubi8/ubi@sha256:d748c21a55796827da82c61f162b505c59451cba24f1874e5185f21275b6bddc                                                                                                               0.0s
 => => sha256:d748c21a55796827da82c61f162b505c59451cba24f1874e5185f21275b6bddc 1.47kB / 1.47kB                                                                                                                                           0.0s
 => => sha256:7bdaaa7ccaa471c4013a6cdf7a6b3f8008df8f120dced5cf697a5e1fcdd8a88f 737B / 737B                                                                                                                                               0.0s
 => => sha256:d57fe082144d2c4e8f84f5ce41653a8a1b782ddc756b9b29e0f89bfb5b5d04a8 1.79kB / 1.79kB                                                                                                                                           1.6s
 => => sha256:84adcb72d423102f9ba3ac998b2682b2de71651a717ac0a780824ba7179589bf 4.36kB / 4.36kB                                                                                                                                           0.0s
 => => sha256:7d6ea16a444e2039f3bb758cb02fb20c3b06038268376415fcdba3c5fcb9a3f4 73.13MB / 73.13MB                                                                                                                                        55.8s
 => => unpacking registry.access.redhat.com/ubi8/ubi@sha256:d748c21a55796827da82c61f162b505c59451cba24f1874e5185f21275b6bddc                                                                                                             2.6s
 => [linux/amd64 builder 1/4] FROM docker.io/library/golang:1.14@sha256:2586a80bea5329c08ef5e4e48a120f1fe947c4f928f51f189dbdb3fe8b40c9d2                                                                                                64.8s
 => => resolve docker.io/library/golang:1.14@sha256:2586a80bea5329c08ef5e4e48a120f1fe947c4f928f51f189dbdb3fe8b40c9d2                                                                                                                     0.0s
 => => sha256:15f72b7c8f18323f8553510a791f68b78ecdf2f1b0acae865fa3d8a1636b3fd4 1.79kB / 1.79kB                                                                                                                                           0.0s
 => => sha256:6e11e1e4650d749ca46410a49131057d823aa1ee2535ed22603225b7d3c18a56 123.81MB / 123.81MB                                                                                                                                      53.8s
 => => sha256:d6747a138341da1c909882b46336e64284d30eaec2e23bf60501c200d2c4bdb2 7.07kB / 7.07kB                                                                                                                                           0.0s
 => => sha256:71e126169501d71bbbd0d3c8d9f35836c41660869fe8432ac606341ed21f7adb 7.81MB / 7.81MB                                                                                                                                          13.1s
 => => sha256:57df1a1f1ad841deaf50c8f662d77e93b4b17af776ed66148116607f9aceffa8 50.40MB / 50.40MB                                                                                                                                        38.0s
 => => sha256:2586a80bea5329c08ef5e4e48a120f1fe947c4f928f51f189dbdb3fe8b40c9d2 2.36kB / 2.36kB                                                                                                                                           0.0s
 => => sha256:7bdfcd218115a9dd843c6d26710b7f5e089717612d764ab4e0d15cc3eb749fa8 126B / 126B                                                                                                                                               1.6s
 => => sha256:1af28a55c3f320826db8df3146a2c198f9042877ef679f9e32210aa9a7fac9ef 10.00MB / 10.00MB                                                                                                                                         8.1s
 => => sha256:f4773b3414236a2e613e862551f8e9afc2f82dbca223b5ccf1d246ac64b2097e 68.67MB / 68.67MB                                                                                                                                        44.1s
 => => sha256:03f1c9932170e54fface2382b2550b8052ae3d41f27e66ea1294e2055dd2b2e7 51.83MB / 51.83MB                                                                                                                                        40.3s
 => => unpacking docker.io/library/golang:1.14@sha256:2586a80bea5329c08ef5e4e48a120f1fe947c4f928f51f189dbdb3fe8b40c9d2                                                                                                                   9.6s
 => [linux/arm64 builder 1/4] FROM docker.io/library/golang:1.14@sha256:2586a80bea5329c08ef5e4e48a120f1fe947c4f928f51f189dbdb3fe8b40c9d2                                                                                                62.3s
 => => resolve docker.io/library/golang:1.14@sha256:2586a80bea5329c08ef5e4e48a120f1fe947c4f928f51f189dbdb3fe8b40c9d2                                                                                                                     0.0s
 => => sha256:2586a80bea5329c08ef5e4e48a120f1fe947c4f928f51f189dbdb3fe8b40c9d2 2.36kB / 2.36kB                                                                                                                                           0.0s
 => => sha256:d3a32671b6316bd11f4bf18cb034394ac94d2bb3bc6d09de388b19b06fb94b91 49.18MB / 49.18MB                                                                                                                                        36.8s
 => => sha256:ad7c41999aa9f871546022553f35d4fbbd39cd2bfe8e1a03cce7b1bd78d2a5b0 52.16MB / 52.16MB                                                                                                                                        39.1s
 => => sha256:db816c48bf4a95f339e7ed6930e715b2197e6c413826d089b2cf3d71a661d3ec 7.06kB / 7.06kB                                                                                                                                           0.0s
 => => sha256:f110d64c20212ec5e7a7f0622d610346edbd6e508fde94679db44e0f2827b2f9 9.98MB / 9.98MB                                                                                                                                           8.3s
 => => sha256:d1c9e71602eeb449642c969df98714a08d8a6c834fe12d13407ac9e6412b6d89 101.13MB / 101.13MB                                                                                                                                      52.1s
 => => sha256:48b922c88d1fbbd1e04d4db654edab4a9f084a960aea1f724bc8a7b73a97adc2 1.79kB / 1.79kB                                                                                                                                           0.0s 
 => => sha256:aff4f413a3a9d7e3268eed8592d73b7ededfcca9876bea258dbddeced25b1842 155B / 155B                                                                                                                                               2.8s
 => => sha256:4b1202c4ddac582c7164a6b65b13a2442759bc04660da9ca7d62fabf75225482 7.68MB / 7.68MB                                                                                                                                          18.3s
 => => sha256:422b93158f2fdb0f38b0153fb7aaa2fbc32743197a85aaf1e38438c13409497b 62.53MB / 62.53MB                                                                                                                                        34.6s
 => => sha256:4b1202c4ddac582c7164a6b65b13a2442759bc04660da9ca7d62fabf75225482 7.68MB / 7.68MB                                                                                                                                          18.3s
 => => unpacking docker.io/library/golang:1.14@sha256:2586a80bea5329c08ef5e4e48a120f1fe947c4f928f51f189dbdb3fe8b40c9d2                                                                                                                   8.6s
 => [linux/amd64 stage-1 2/4] RUN INSTALL_PKGS="       openssl       " &&     yum install -y $INSTALL_PKGS &&     rpm -V $INSTALL_PKGS &&     yum clean all &&     mkdir /tmp/_working_dir &&     chmod og+w /tmp/_working_dir           6.0s
 => [linux/arm64 stage-1 2/4] RUN INSTALL_PKGS="       openssl       " &&     yum install -y $INSTALL_PKGS &&     rpm -V $INSTALL_PKGS &&     yum clean all &&     mkdir /tmp/_working_dir &&     chmod og+w /tmp/_working_dir          18.2s
 => [linux/arm64 builder 2/4] COPY . /go/src/github.com/jaegertracing/jaeger-operator/                                                                                                                                                   1.3s
 => [linux/arm64 builder 3/4] WORKDIR /go/src/github.com/jaegertracing/jaeger-operator                                                                                                                                                   0.1s
 => [linux/arm64 builder 4/4] RUN make gobuild                                                                                                                                                                                         209.3s
 => [linux/amd64 builder 2/4] COPY . /go/src/github.com/jaegertracing/jaeger-operator/                                                                                                                                                   0.5s
 => [linux/amd64 builder 3/4] WORKDIR /go/src/github.com/jaegertracing/jaeger-operator                                                                                                                                                   0.1s
 => [linux/amd64 builder 4/4] RUN make gobuild                                                                                                                                                                                          49.8s
 => [linux/amd64 stage-1 3/4] COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/scripts/* /scripts/                                                                                                                   0.1s
 => [linux/amd64 stage-1 4/4] COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/build/_output/bin/jaeger-operator /usr/local/bin/jaeger-operator                                                                      0.1s
 => [linux/arm64 stage-1 3/4] COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/scripts/* /scripts/                                                                                                                   0.1s
 => [linux/arm64 stage-1 4/4] COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/build/_output/bin/jaeger-operator /usr/local/bin/jaeger-operator                                                                      0.1s

Please, make sure this is all documented in the contributing guide in a new session. Even though this is going to be executed by the CI most of the time, we need to be able to execute this locally as well.

@jpkrohling
Copy link
Contributor

@morlay, are you still interested in working on this one? I think this is working fine, just needs documentation.

@jpkrohling jpkrohling mentioned this pull request Oct 8, 2020
@morlay
Copy link
Contributor Author

morlay commented Oct 9, 2020

@jpkrohling
Sorry for updating docs so late.
Back to work just now from holiday.

I added steps for setup buildx local env.

The security or network issue is about docker with the special linux distribution.
it is not for buildx.
so i think this part may mot be here.

Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I'll run some manual tests and merge if everything goes well.

@jpkrohling
Copy link
Contributor

Looks good so far! Merging.

Thanks for contributing this very cool feature and for the patience, @morlay!

@jpkrohling jpkrohling merged commit 9cedde6 into jaegertracing:master Oct 12, 2020
@morlay
Copy link
Contributor Author

morlay commented Oct 12, 2020

Cool.

jaeger could be next step 😂jaegertracing/jaeger#2325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants