temporalio / samples-server

MIT License
37 stars 32 forks source link

[Bug] promql-to-dd docker image does not define entrypoint #60

Closed joelmarty closed 11 months ago

joelmarty commented 11 months ago

What are you really trying to do?

Running the generated ghcr docker image with arguments:

docker run ghcr.io/temporalio/promql-to-dd-go:sha-e01d26f --client-cert=foo

Describe the bug

Running the command above fails with the following error:

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "--client-cert=foo": executable file not found in $PATH: unknown.

This error comes from https://github.com/temporalio/samples-server/blob/main/cloud/observability/promql-to-dd-go/Dockerfile#L24: adding arguments to the docker cli (or specifying args in docker-compose/helm chart) will overwrite the CMD value and it will try to execute the arguments as a binary.

Instead, that line should be ENTRYPOINT ["/promqltodd"] so arguments passed to the image invocation are passed to the entrypoint.

Minimal Reproduction

docker run ghcr.io/temporalio/promql-to-dd-go:sha-e01d26f --client-cert=foo

Environment/Versions

All published versions in ghcr.io

taonic commented 11 months ago

Hey @joelmarty I like this suggestion. I'll cut a PR to update shortly.