We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug If you try to build the OpenTelemetry container within a Docker container, it fails because the Go toolchain is too old (v1.20):
Steps to reproduce Run the following command: docker build -t otel -f cmd/awscollector/Dockerfile .
docker build -t otel -f cmd/awscollector/Dockerfile .
What did you expect to see? A successful build
What did you see instead?
docker build -t otel -f cmd/awscollector/Dockerfile . [+] Building 76.2s (13/25) docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 2.56kB 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/golang:1.20 1.4s => [internal] load metadata for docker.io/library/alpine:latest 0.8s => [prep-build 1/8] FROM docker.io/library/golang:1.20@sha256:8f9af7094d0cb27cc783c697ac5ba25efdc4da35f8526db21f7aebb0b0b4f18a 31.5s => => resolve docker.io/library/golang:1.20@sha256:8f9af7094d0cb27cc783c697ac5ba25efdc4da35f8526db21f7aebb0b0b4f18a 0.0s => => sha256:e08e8703b2fb5e50153f792f3192087d26970d262806b397049d61b9a14b3af5 24.05MB / 24.05MB 3.4s => => sha256:68e92d11b04ec0fe48e60d59964704aca234084f87af5d1a068c49456b37fe3d 64.14MB / 64.14MB 16.6s => => sha256:8f9af7094d0cb27cc783c697ac5ba25efdc4da35f8526db21f7aebb0b0b4f18a 2.36kB / 2.36kB 0.0s => => sha256:c1a446d8f0c5658cc9af7b207a521995cf26bcfe1c9e6a4e148ba4eb8ed2e8b5 1.79kB / 1.79kB 0.0s => => sha256:d5beeac3653f7c94aeda867588172915ce848d8d49d4ca24d24245505949b64d 2.75kB / 2.75kB 0.0s => => sha256:6a299ae9cfd996c1149a699d36cdaa76fa332c8e9d66d6678fa9a231d9ead04c 49.58MB / 49.58MB 17.7s => => sha256:4105062d1ee61f98bb0f7f6c0ac998caf55ff9a0e0fda9aa1fddbecc1f591687 92.37MB / 92.37MB 24.8s => => sha256:870a28135dd085067b84c7b2af0529d02eab744a63d2834ad2780934573b2be6 100.45MB / 100.45MB 29.0s => => sha256:ffe80ff754489bcce87b4c3580467de7a34764fc1ad5831f6eed096c78320a43 173B / 173B 17.8s => => extracting sha256:6a299ae9cfd996c1149a699d36cdaa76fa332c8e9d66d6678fa9a231d9ead04c 1.0s => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B 18.0s => => extracting sha256:e08e8703b2fb5e50153f792f3192087d26970d262806b397049d61b9a14b3af5 0.3s => => extracting sha256:68e92d11b04ec0fe48e60d59964704aca234084f87af5d1a068c49456b37fe3d 1.4s => => extracting sha256:4105062d1ee61f98bb0f7f6c0ac998caf55ff9a0e0fda9aa1fddbecc1f591687 1.2s => => extracting sha256:870a28135dd085067b84c7b2af0529d02eab744a63d2834ad2780934573b2be6 2.2s => => extracting sha256:ffe80ff754489bcce87b4c3580467de7a34764fc1ad5831f6eed096c78320a43 0.0s => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 0.0s => [internal] load build context 0.4s => => transferring context: 81.06MB 0.4s => [base 1/3] FROM docker.io/library/alpine:latest@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b 0.0s => [prep-build 2/8] WORKDIR /workspace 0.2s => [prep-build 3/8] COPY go.mod . 0.0s => [prep-build 4/8] COPY go.sum . 0.0s => [prep-build 5/8] RUN go mod download -x 41.0s => [prep-build 6/8] COPY . . 0.2s => ERROR [prep-build 7/8] RUN make amd64-build 1.7s ------ > [prep-build 7/8] RUN make amd64-build: 1.297 find: './patches': No such file or directory 1.298 cd /workspace/tools/workflow/linters && GOBIN=/workspace/bin go install golang.org/x/tools/cmd/goimports 1.301 go: errors parsing go.mod: 1.301 /workspace/tools/workflow/linters/go.mod:5: unknown directive: toolchain 1.302 make: *** [Makefile:208: install-tools] Error 1 ------ Dockerfile:50 -------------------- 48 | 49 | # build 50 | >>> RUN make ${TARGETARCH}-build 51 | 52 | # move -------------------- ERROR: failed to solve: process "/bin/sh -c make ${TARGETARCH}-build" did not complete successfully: exit code: 2
The text was updated successfully, but these errors were encountered:
The issue is resolved if I update the toolchain to Go 1.22 by hand
Sorry, something went wrong.
It seems there already exists PR #2621 to update the toolchain...
A second issue: RUN make ${TARGETARCH}-build should actually be: RUN make ${TARGETARCH}-build ${TARGETARCH}-build-healthcheck
RUN make ${TARGETARCH}-build
RUN make ${TARGETARCH}-build ${TARGETARCH}-build-healthcheck
Fix building of binaries inside Docker container
c8108e3
to address aws-observability#2659
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
No branches or pull requests
Describe the bug
If you try to build the OpenTelemetry container within a Docker container, it fails because the Go toolchain is too old (v1.20):
Steps to reproduce
Run the following command:
docker build -t otel -f cmd/awscollector/Dockerfile .
What did you expect to see?
A successful build
What did you see instead?
The text was updated successfully, but these errors were encountered: