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

Fix make docker-telemetrygen command #33989

Merged
merged 4 commits into from
Jul 10, 2024

Conversation

damemi
Copy link
Contributor

@damemi damemi commented Jul 9, 2024

Description:
While building make docker-telemetrygen, it appears broken:

$ make docker-telemetrygen
no Go files in //home/mikedame/go/src/github.com/open-telemetry/opentelemetry-collector-contrib
GOOS=linux GOARCH=amd64 make telemetrygen
make[1]: Entering directory '/home/mikedame/go/src/github.com/open-telemetry/opentelemetry-collector-contrib'
no Go files in /home/mikedame/go/src/github.com/open-telemetry/opentelemetry-collector-contrib
cd ./cmd/telemetrygen && GO111MODULE=on CGO_ENABLED=0 go build -trimpath -o ../../bin/telemetrygen_linux_amd64 \
	-tags "" .
make[1]: Leaving directory '/home/mikedame/go/src/github.com/open-telemetry/opentelemetry-collector-contrib'
cp bin/telemetrygen_* cmd/telemetrygen/
cd cmd/telemetrygen && docker build --platform linux/amd64 -t telemetrygen:latest .
Sending build context to Docker daemon   25.2MB
Step 1/10 : FROM alpine:latest as certs
 ---> 1d34ffeaf190
Step 2/10 : RUN apk --update add ca-certificates
 ---> Using cache
 ---> 958d3ffd0e84
Step 3/10 : FROM scratch
 ---> 
Step 4/10 : ARG USER_UID=10001
 ---> Using cache
 ---> 77b85f6e33ac
Step 5/10 : USER ${USER_UID}
 ---> Using cache
 ---> 22c6919286c2
Step 6/10 : ARG TARGETOS
 ---> Using cache
 ---> 742a0cf13877
Step 7/10 : ARG TARGETARCH
 ---> Using cache
 ---> 751f7303ea11
Step 8/10 : COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
 ---> Using cache
 ---> 3450c4e5656e
Step 9/10 : COPY ./telemetrygen_${TARGETOS}_${TARGETARCH} /telemetrygen
COPY failed: file not found in build context or excluded by .dockerignore: stat telemetrygen__: file does not exist
make: *** [Makefile:281: docker-telemetrygen] Error 1

This makes sure the TARGETOS and TARGETARCH args are set

Link to tracking Issue:

Testing:

Documentation:

@damemi damemi force-pushed the fix-docker-telemetrygen branch from d53e74a to 87ccf3f Compare July 9, 2024 16:40
@damemi damemi force-pushed the fix-docker-telemetrygen branch from 45ff929 to 87ccf3f Compare July 9, 2024 16:43
@mx-psi mx-psi merged commit 4f248c9 into open-telemetry:main Jul 10, 2024
154 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 10, 2024
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