Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix chainguard image base #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@ RUN ./mvnw clean package spring-boot:repackage


# Note: The default non root chainguard user is 65532
FROM cgr.dev/chainguard/jdk:openjdk-jre-11-20221109
FROM cgr.dev/chainguard/jdk:latest

USER root
RUN mkdir -p /opt/.logs \
&& mkdir -p /apidef
RUN chown -R 65532:65532 /opt/
RUN mkdir -p /app/.logs \
&& mkdir -p /apidef
RUN chown -R 65532:65532 /app/
USER 65532
COPY --from=build /build/target/dcat-ap-processor-0.0.2-SNAPSHOT.jar /opt/app.jar
COPY --from=build /build/target/dcat-ap-processor-0.0.2-SNAPSHOT.jar /app/app.jar


ENV JDK_JAVA_OPTIONS -Duser.language=sv-SE -Duser.region=SE -Duser.timezone=Europe/Stockholm
WORKDIR /opt
ENV PORT 8080
EXPOSE 8080
CMD ["-jar","app.jar"]
CMD ["java","-jar","/app/app.jar"]