-
Couldn't load subscription status.
- Fork 477
fix: move entrypoint scripts from /opt to home directory #5986
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: move entrypoint scripts from /opt to home directory #5986
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How was this PR tested? Can you please try building Docker images with this change, running them, and verifying the entrypoint.sh script is still invoked correctly? Perhaps also manually inspecting the produced Docker image to ensure the entrypoint.sh script is moved to the correct place.
|
Hi @rootulp! Thanks for the comment. I've tested the changes, and HERE'S what I got. docker build -t celestia-node-test .
docker run --rm celestia-node-test:latest ls -la /home/celestia/entrypoint.sh
docker run --rm celestia-node-test:latest celestia
docker run --rm celestia-node-test:latest env | grep -E "(NODE_TYPE|P2P_NETWORK|CELESTIA_HOME)"
|
|
The CLI output is for celestia-node which is different from celestia-app. |
|
@DeVikingMark why does this PR modify the Dockerfiles if the motivating issue is only for local_devnet: #4670 |
|
Hey @rootulp, sorry for the late answer, While #4670 specifically mentions local_devnet, the underlying issue was that entrypoint scripts were being copied to /opt/entrypoint.sh, which requires root permissions. The /opt directory requires root permissions, which isn't great for security. Moving everything to the user's home directory (${CELESTIA_APP_HOME}) is cleaner and more secure. So I figured if we're fixing this pattern, we might as well fix it everywhere - standalone, multiplexer, and txsim containers. Does that make sense? |
|
That makes sense but I'm hesitant to include this without getting user feedback from node operators that use the existing Docker images. I don't want to break them unnecessarily. |
|
I guess a first feedback should come from the devops team. cc @sysrex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would the entrypoint reside in the home folder? this has always been in /opt just like for node https://github.com/celestiaorg/celestia-node/blob/main/Dockerfile#L69
- also most installations will mount
/home/celestia/.celestia-appon additional disks for obvious reasons, which means this can have unintended consequences.
|
@sysrex thanks for the feedback! I've updated the pullrequest to apply changes only to local_devnet |
| COPY --from=builder /celestia-app/build/txsim /bin/txsim | ||
|
|
||
| COPY --chown=${USER_NAME}:${USER_NAME} docker/txsim/entrypoint.sh /opt/entrypoint.sh | ||
| COPY --chown=${USER_NAME}:${USER_NAME} docker/txsim/entrypoint.sh ${CELESTIA_APP_HOME}/entrypoint.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the pullrequest to apply changes only to local_devnet
txsim can be used outside of local_devnet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've re-read the original issue and I still don't understand the concrete problem and proposal. I think we need more clarity in #4670 before we try implementing it.
|
Also now the PR description is out of date. IMO let's close this for now and ask for clarity in the original issue. |



















Fixes #4670
Moves entrypoint scripts from
/optto user home directory in Docker containers.Changes:
docker/standalone.Dockerfiledocker/multiplexer.Dockerfiledocker/txsim/DockerfileBefore: Scripts copied to
/opt/entrypoint.shAfter: Scripts copied to
${CELESTIA_APP_HOME}/entrypoint.sh