fix(docker): remove broken symlink creation for varnish exporter#276
Open
CorentinRegnier wants to merge 1 commit intomittwald:masterfrom
Open
fix(docker): remove broken symlink creation for varnish exporter#276CorentinRegnier wants to merge 1 commit intomittwald:masterfrom
CorentinRegnier wants to merge 1 commit intomittwald:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request fixes a runtime issue in the
GoReleaser.Dockerfilethat affects theprometheus_varnish_exporterbinary. While the image builds successfully, the exporter fails to run due to an invalid symlink.Problem
The Dockerfile attempts to create a symlink to
prometheus_varnish_exporterafter extracting the archive:However, this symlink points to a path that no longer exists at runtime, because the extracted directory is not preserved or included properly in the final image layer. As a result, the binary at
/exporter/prometheus_varnish_exporteris broken.This causes container startup to fail when the exporter is invoked.
Screenshot / Error output
Click to expand runtime error
On kubernetes
Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/exporter/prometheus_varnish_exporter": stat /exporter/prometheus_varnish_exporter: no such file or directory: unknownRegression context
This issue was introduced starting from version v0.9.1, when the Prometheus exporter was switched to prometheus_varnish_exporter. The problem is still present on the current master branch.
As of these versions, the image includes a broken symlink for the exporter binary, making the container unusable in runtime contexts like AKS or Helm-based deployments.
What changed
ln -sfstepThe binary is already placed in the expected location during extraction, so no symlink is required.
How I tested
I built the Docker image with the fix and pushed it to my own container registry:
docker build -t my-registry.example.com/kube-httpcache:dev -f build/package/docker/GoReleaser.Dockerfile . docker push my-registry.example.com/kube-httpcache:devI then deployed it on a real Kubernetes cluster (AKS) by updating the image reference in the Helm values to point to my custom image.
✅ With this fix, the prometheus_varnish_exporter binary runs correctly and the pod starts successfully.
❌ Without the fix, the exporter binary fails to execute due to a broken symlink, preventing proper startup.
Why it matters
Without this fix, the Docker image produces a broken runtime due to a missing binary, even though the build succeeds. This breaks local testing and deployment workflows — particularly those relying on KinD or Helm installs using the built image.