-
Notifications
You must be signed in to change notification settings - Fork 37
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
Running protoc-gen-kotlin as root fails with an error #73
Comments
Hi, I'm trying to add the |
In general, using an unprivileged user is best practice for Docker containers. But I don't know if that would make the I don't think the change on the pbandk side to make this work properly would be that difficult if you wanted to tackle it on the pbandk side. It involves:
|
I'm just using the script as an intermediate build stage for a separate final image, having this script available would be the easiest solution for me. |
Running
protoc
as root with the--kotlin_out
option produces an error:This is because pbandk uses Spring Boot's
launchScript
feature in order to turnprotoc-gen-kotlin.jar
into a self-executable file. The default launch script used by Spring Boot prints a warning if run as root. This is mainly in place to prevent running Spring Boot jars as services under the root account. Since pbandk doesn't need the service-related functionality, we should probably replace the default Spring Boot launch script with a much-simplified custom version using something like:The text was updated successfully, but these errors were encountered: