Slim images
A Java Application that uses Spring-boot
- To run spring boot application we require JAVA JDK and a jar file
- We have build the package locally
- using the dockerfile in the changeset Refer Here we have built the docker image which copies the jar file into docker image
- Refer Here for the changes to use the slim version or alpine version.
- Best Practices:
- It is not recommended to run your application as root user.
- It is not recommened to run your applications from root directory
- From now on lets always have application directory
- WORKDIR
- Refer Here for the changes to include WORKDIR
- USER instruction will set the user
- Refer Here for the changes that create a user
