Skip to content

fix: use --entrypoint /bin/sh in smoke-test-cmd to support binary entrypoints#267

Merged
DeepDiver1975 merged 1 commit into
owncloud-docker:masterfrom
DeepDiver1975:fix/smoke-test-cmd-entrypoint
May 8, 2026
Merged

fix: use --entrypoint /bin/sh in smoke-test-cmd to support binary entrypoints#267
DeepDiver1975 merged 1 commit into
owncloud-docker:masterfrom
DeepDiver1975:fix/smoke-test-cmd-entrypoint

Conversation

@DeepDiver1975
Copy link
Copy Markdown
Contributor

Problem

The smoke-test-cmd step runs:

docker run --rm image /bin/sh -c "${SMOKE_CMD}"

This works for images with no ENTRYPOINT or with a shell wrapper entrypoint (e.g. /usr/bin/entrypoint that calls exec "$@"). However, for images with a binary ENTRYPOINT (e.g. ENTRYPOINT ["wait-for"]), Docker passes /bin/sh -c "..." as arguments to the binary, not as a shell command. The binary then receives unexpected positional arguments and typically exits non-zero.

Fix

Use --entrypoint /bin/sh to unconditionally override any entrypoint:

docker run --rm --entrypoint /bin/sh image -c "${SMOKE_CMD}"

This is consistent with how smoke-test-entrypoint-cmd already works (line 143). It is safe for all image types:

  • Images with no ENTRYPOINT: behavior unchanged
  • Images with a shell wrapper ENTRYPOINT (e.g. owncloudci/php): entrypoint override, shell command still runs correctly
  • Images with a binary ENTRYPOINT (e.g. owncloudci/wait-for): now works correctly

Reference

Discovered while fixing the smoke test in owncloud-ci/wait-for#164.

🤖 Generated with Claude Code

…rypoints

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975 DeepDiver1975 merged commit 5685960 into owncloud-docker:master May 8, 2026
5 checks passed
@DeepDiver1975 DeepDiver1975 deleted the fix/smoke-test-cmd-entrypoint branch May 8, 2026 11:26
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.

2 participants