diff --git a/provider/register-aws/build-aws/Dockerfile b/provider/register-aws/build-aws/Dockerfile index 4fcf83afdc243e4fbc06fad6e334a14d086373b4..e07b6ef063ce9582ef288d8894193e6aa68a2246 100644 --- a/provider/register-aws/build-aws/Dockerfile +++ b/provider/register-aws/build-aws/Dockerfile @@ -15,7 +15,9 @@ # https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html FROM public.ecr.aws/amazoncorretto/amazoncorretto:17 -RUN yum update -y +RUN yum update -y && yum install -y shadow-utils \ + && groupadd -g 10001 -r appgroup \ + && useradd -M -g 10001 -r -u 10001 appuser ARG JAR_FILE=provider/register-aws/target/*spring-boot.jar # Harcoding this value since Register-core requires this variable. AWS does not use it. Might change in future @@ -28,4 +30,5 @@ COPY ${JAR_FILE} app.jar COPY /provider/register-aws/build-aws/entrypoint.sh /entrypoint.sh EXPOSE 8080 +USER 10001:10001 ENTRYPOINT ["/bin/sh", "-c", ". /entrypoint.sh"]