The image's binaries are executable when built from a download #28

Merged
jcoffey-dev merged 1 commits from image-exec-bit into main 2026-11-15 21:20:20 +00:00
Owner

Bug in v0.1.0's image: ghcr.io/coffey-labs/cairnobs:0.1.0 fails to start, exec: "/usr/bin/obs-beacond": permission denied. Release downloads are 0644 and the Containerfile copies the binaries with the mode they have. (The local test before tagging used freshly built, executable files.)

  • scripts/build-image.sh: chmod 0755 the binaries in the build context, so building from downloaded release files works for anyone (the docs say to do exactly that).
  • .github/workflows/release.yml: chmod after the checks, since a re-run checks out the tag's own build-image.sh; and after pushing, it pulls the image and runs both binaries' -version, failing if either doesn't start or says another version.

Tested: v0.1.0's downloaded binaries through the fixed steps, amd64 image loaded locally, both say 0.1.0.

After merging: gh workflow run release.yml --ref main -f tag=v0.1.0 republishes :0.1.0 and :latest (the GitHub Release step skips, it exists).

**Bug in v0.1.0's image:** `ghcr.io/coffey-labs/cairnobs:0.1.0` fails to start, `exec: "/usr/bin/obs-beacond": permission denied`. Release downloads are 0644 and the Containerfile copies the binaries with the mode they have. (The local test before tagging used freshly built, executable files.) - `scripts/build-image.sh`: `chmod 0755` the binaries in the build context, so building from downloaded release files works for anyone (the docs say to do exactly that). - `.github/workflows/release.yml`: `chmod` after the checks, since a re-run checks out the tag's own build-image.sh; and after pushing, it pulls the image and runs both binaries' `-version`, failing if either doesn't start or says another version. Tested: v0.1.0's downloaded binaries through the fixed steps, amd64 image loaded locally, both say `0.1.0`. After merging: `gh workflow run release.yml --ref main -f tag=v0.1.0` republishes `:0.1.0` and `:latest` (the GitHub Release step skips, it exists).
jcoffey-dev added 1 commit 2026-11-15 21:10:10 +00:00
The image's binaries are executable when built from a download
ci / check (pull_request) Successful in 4m48s
ci / postgres (pull_request) Successful in 9m55s
2bc05da433
A release's binaries download as 0644 and the image keeps the mode it's
given, so v0.1.0's first image couldn't start (exec: permission denied).
build-image.sh now makes them executable in its build context, the GitHub
workflow does too after checking them, and the workflow then runs both
binaries from the pushed image and checks their version.
jcoffey-dev merged commit 28ee9fbbb8 into main 2026-11-15 21:20:20 +00:00
jcoffey-dev deleted branch image-exec-bit 2026-11-15 21:20:20 +00:00
Sign in to join this conversation.