Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docker): use target binary build param as name of image entrypoint (
#1573) ## Summary Fixes container images to use the `$TARGETBINARY` build param as the name of the binary run in the image entrypoint. ## Background Before this patch, the containerfile entrypoint used a symlinked `/usr/local/bin/entrypoint` as the entrypoint, which caused the name of the binary to be `"entrypoint"`. This itself was to workaround to the `ENTRYPOINT` command not allowing for variables in exec form. This patch instead creates an ad-hoc script which itself executes `$TARGETBINARY`, and uses this script as the entrypoint. Together with the script using `exec` and the exec form of `ENTRYPOINT` the expected binary (and process) name are used. Taking `astria-cli`'s help message as an example: Before: ``` Get the balance of a Sequencer account Usage: entrypoint sequencer balance get [OPTIONS] <ADDRESS> ``` After: ``` Get the balance of a Sequencer account Usage: astria-cli sequencer balance get [OPTIONS] <ADDRESS> ``` ## Changes - Create an adhoc `/usr/local/bin/entrypoint.sh` script in `containerfiles/Dockerfile` which is used as a new entrypoint and executes `$TARGETBINARY` ## Testing Built and ran images using the dockerfile. No functionality was changed but the binary is `$TARGETBINARY` and not `entrypoint` now. ## Related Issues closes #1571
- Loading branch information