Repository navigation
fix(grafana): run entrypoint with POSIX sh - #9312
Merged
Merged
Conversation
grafana/grafana:13.3.0 no longer ships bash, so the image failed to start with "exec /entrypoint.sh: no such file or directory". Switch the shebang to /bin/sh and replace the only bashism ($'\n'). Add grafana/scripts/smoke-test.sh plus a pull_request workflow that builds the image and checks that it starts and creates a healthy datasource against MySQL and PostgreSQL, so base image bumps that break startup are caught before merge. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
klesh
approved these changes
Nov 6, 2026
klesh
left a comment
Contributor
There was a problem hiding this comment.
Good work.
Thanks for your contribution.
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.
pr-type/bug-fix,pr-type/feature-development, etc.Summary
Since the bump to
grafana/grafana:13.3.0(#9295) thedevlake-dashboardimage no longer starts:The 13.3.0 base image (Alpine/busybox) no longer ships
bash, butgrafana/scripts/entrypoint.shused#!/bin/bash./bin/sh. Its only bashism ($'\n'in a parameter expansion) is replaced by a portable equivalent. This change does not addbashto the image.grafana/scripts/smoke-test.sh <image> [mysql|postgresql]starts the image next to a throwaway database. It checks that the container keeps running,/api/healthis OK, the entrypoint creates the DevLake datasource, and the datasource health check reaches the database. It only uses uniquely named containers/network and removes them afterwards.grafana-image-smoke-test.ymlruns on pull requests touchinggrafana/**and builds the image and runs the smoke test against MySQL and PostgreSQL. A future base-image bump (e.g. from Dependabot) that breaks startup would then fail before merge.Does this close any open issues?
Regression from #9295; no separate issue.
Screenshots
n/a
Other Information
Validation:
grafana/scripts/smoke-test.sh <image built from main> postgresql→ failed as expected (grafana container exited (exit code 255),exec /entrypoint.sh: no such file or directory).grafana/scripts/smoke-test.sh <image built from this branch> mysql→ passed.grafana/scripts/smoke-test.sh <image built from this branch> postgresql→ passed.shellcheck grafana/scripts/smoke-test.sh grafana/scripts/entrypoint.sh→ passed.