Hi i have created a spring boot application and want to add a non root user to in the docker file.
i was looking at the followinghttps://spring.io/guides/topicals/spring-boot-docker/
and this command
RUN addgroup -S demo && adduser -S demo -G demoUSER demo
but this doesnt work in my docker file which is based on the followin image
FROM eclipse-temurin:17-focalWORKDIR /appCOPY target/*.jar app.jarEXPOSE 8080RUN addgroup -S demo && adduser -S demo -G demoUSER demoENTRYPOINT ["java","-jar","/app.jar"]
Error:
error: failed to solve: process "/bin/sh -c addgroup -S app && adduser -S app -G app" did not complete successfully: exit code: 1