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

Create sbt-plugin to package CLI app as GraalVM native Docker image #4

Closed
jdegoes opened this issue May 9, 2020 · 5 comments
Closed

Comments

@jdegoes
Copy link
Member

jdegoes commented May 9, 2020

A small and simple SBT plug-in that can package up a CLI application as a GraalVM native docker image would make it much easier to prepare ZIO CLI applications for deployment.

Perhaps this could be a source of inspiration or a component of this solution.

@alterationx10
Copy link
Contributor

I'd like to help with this one!

@alterationx10
Copy link
Contributor

@jdegoes This might have been more complicated in May than it was in August 😄 I have played around with the sbt-native-packager, but there is also the sbt plugin https://github.com/scalameta/sbt-native-image that has recently come out which performs the sorcery of even automatically downloading/installing GraalVM native-image!

Would you recommend still integrating a custom sbt plugin for this, or use this other package?

@jdegoes
Copy link
Member Author

jdegoes commented Nov 21, 2020

@alterationx10 This looks nice!

Maybe it would be possible to have an SBT plug-in that depends on sbt-native-image, but which can also perform ZIO CLI-specific actions, such as generating the runner/installer script and so forth?

It would be nice to have an SBT task called build-cli or something that performs the full process, resulting in the native image configured appropriately for the CLIApp together with the runner/installer script.

@alterationx10
Copy link
Contributor

There could be some tasks to generate the shell completion as well

@alterationx10
Copy link
Contributor

WIP PR #57 for early discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants