Skip to content
Snippets Groups Projects
Commit ecd81f9a authored by Yunhua Koglin's avatar Yunhua Koglin
Browse files

Merge branch 'dockeruser' into 'master'

Add USER in Dockerfile

See merge request !842
parents 3a135437 72dca22f
Branches
Tags
1 merge request!842Add USER in Dockerfile
Pipeline #292869 failed
......@@ -15,7 +15,10 @@
# 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
RUN groupadd -g 10001 -r appgroup \
&& useradd -M -g 10001 -r -u 10001 appuser
ARG JAR_FILE=provider/indexer-aws/target/*spring-boot.jar
......@@ -25,4 +28,5 @@ COPY ${JAR_FILE} app.jar
COPY /provider/indexer-aws/build-aws/entrypoint.sh /entrypoint.sh
EXPOSE 8080
USER 10001:10001
ENTRYPOINT ["/bin/sh", "-c", ". /entrypoint.sh"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment