Skip to content

Split Docker toolchain stage and make entrypoint overridable#92

Open
nitroxit wants to merge 1 commit into
flipperdevices:devfrom
nitroxit:docker-toolchain-entrypoint
Open

Split Docker toolchain stage and make entrypoint overridable#92
nitroxit wants to merge 1 commit into
flipperdevices:devfrom
nitroxit:docker-toolchain-entrypoint

Conversation

@nitroxit

@nitroxit nitroxit commented Jun 29, 2026

Copy link
Copy Markdown

Summary

  • split the slow-changing toolchain into a reusable Docker stage
  • copy the current checkout into the final image
  • replace the shell-form entrypoint with an exec-form wrapper
  • allow commands such as bash or individual build scripts
  • document the new container workflow

Closes #77
Closes #78

Testing

  • git diff --cached --check
  • docker build --check .
  • docker build --target toolchain -t flipperone-toolchain:test .
  • docker build --progress=plain -t flipperone-linux-build-scripts:test .
  • verified that the final build reused the cached toolchain layers
  • docker run --rm flipperone-linux-build-scripts:test bash -lc "echo override-ok; test -f ./build-uboot.sh"
  • verified the command override printed override-ok and exited with status 0

@nitroxit nitroxit requested a review from a team June 29, 2026 15:16
Comment thread docker-entrypoint.sh
exec "$@"
fi

./build-uboot.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small correction on the signal reasoning here: not exec-ing these doesn't orphan the build. Bash is waiting on each script as a foreground process, so a docker stop still tears the child down - it doesn't get abandoned.

Bash won't fire a trap until the current command returns and it won't reap zombies. If we want an instant, clean stop, simplest is docker run --init. Or maybe trap + background + wait.

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.

Shell-form ENTRYPOINT is a footgun Split Dockerfile into toolchain base + build image

2 participants