I'm attempting to build a Docker image using the Spring Boot Gradle Plugin and am having trouble figuring out how to specify my image configuration.
I'm familiar with the Spotify (Maven) and Palantir (Gradle) Docker plugins for building Docker images from Dockerfiles.
I understand that the Spring Boot Gradle Plugin intelligently selects and builds from the appropriate buildpacks based on settings in the build.gradle file (for example, it looks at the Java version and selects the appropriate JDK base image). It does not use a Dockerfile.
What I don't understand is how the following are done using the bootBuildImage task:
- how might I configure my Spring Boot application to use a custom logging location instead of the Spring default?
- How do I create and specify a different user to run the application as? I cannot use 'cnb' which is the default.
- How do I change ownership of directories to the newly created user?