Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docker): use target binary build param as name of image entrypoint #1573

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

SuperFluffy
Copy link
Member

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

@SuperFluffy SuperFluffy marked this pull request as ready for review September 26, 2024 15:46
@SuperFluffy SuperFluffy requested a review from a team as a code owner September 26, 2024 15:46
@SuperFluffy SuperFluffy added this pull request to the merge queue Sep 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 30, 2024
@SuperFluffy SuperFluffy added this pull request to the merge queue Sep 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 30, 2024
@SuperFluffy SuperFluffy added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit b6df7fd Sep 30, 2024
43 checks passed
@SuperFluffy SuperFluffy deleted the ENG-869/target-binary-as-entrypoint-name branch September 30, 2024 13:41
steezeburger added a commit that referenced this pull request Oct 7, 2024
* main: (34 commits)
  feat(proto): add bundle and optimistic block apis (#1519)
  feat(sequencer)!: make empty transactions invalid  (#1609)
  chore(sequencer): simplify boolean expressions in `transaction container` (#1595)
  refactor(cli): merge argument parsing and command execution (#1568)
  feat(charts): astrotrek chart (#1513)
  chore(charts): genesis template to support latest changes (#1594)
  fix(ci): code freeze action fix (#1610)
  chore(sequencer)!: exclusively use Borsh encoding for stored data (ENG-768) (#1492)
  ci: code freeze through github actions (#1588)
  refactor(sequencer): use builder pattern for transaction container tests (#1592)
  feat(conductor)!: implement chain ID checks (#1482)
  chore(ci): upgrade audit-check (#1577)
  feat(sequencer)!: transaction categories on UnsignedTransaction (#1512)
  fix(charts): sequencer prometheus rules   (#1598)
  chore(all): Migrate all instances of `#[allow]` to `#[expect]` (#1561)
  chore(charts,sequencer-faucet): asset precision (#1517)
  chore(docs): endpoints (#1543)
  fix(docker): use target binary build param as name of image entrypoint (#1573)
  fix(ci): ibc bridge test timeout (#1587)
  Feature: Add `graph-node` to charts. (#1489)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name of entrypoint should be target binary
2 participants