-
Notifications
You must be signed in to change notification settings - Fork 111
Complete PATH in restate-cli image #3958
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
base: main
Are you sure you want to change the base?
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
recheck |
|
I have read the CLA Document and I hereby sign the CLA |
tillrohrmann
left a comment
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.
Thanks a lot for creating this PR @Wouittone. I had a small suggestion.
| ENV PATH=/restate:/restatectl:$PATH | ||
| ENTRYPOINT [ "restate" ] |
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.
Instead of setting the PATH, should we copy restatectl and restate to /usr/local/bin? This might be the least surprising.
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.
Thanks for the comment and the quick response!
I actually started with this implementation but changed it since the previous line copies the whole directory content to / and I didn't know if the binaries needed any of the other files in the same folder.
I would say that the ideal solution would be to remove the copies and symlink the binaries into /usr/local/bin? I just wasn't comfortable with using a RUN command to create symlinks in my first PR but I'd be happy to oblige if it works for you!
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.
The restate-cli should be self-contained. What we do in the Dockerfile for the server image (
Lines 102 to 103 in 31716d7
| COPY --from=upload /restate/target/restatectl /usr/local/bin | |
| COPY --from=upload /restate/target/restate /usr/local/bin |
/usr/local/bin as well.
So COPY --from=builder /restate-cli-${TARGETARCH}/*/* / can probably be COPY --from=builder /restate-cli-${TARGETARCH}/*/restate /
I think we need to copy because we take the binaries from the builder image. If we copy, then I guess we could copy straight away into /usr/local/bin.
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.
That seems to be the most straightforward change indeed, I have pushed it.
I don't expect any change since the entrypoint is now called throught the PATH but just to make sure: is there any test that covers this (in this or another repo, maybe?)
No description provided.