You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
FROM alpine AS build
|
|
|
|
RUN apk update \
|
|
|
|
&& apk add openjdk21-jre
|
|
|
|
RUN apk add bash clang-extra-tools git
|
|
|
|
ADD . /LightOidc
|
|
|
|
WORKDIR /LightOidc
|
|
|
|
RUN VERSION=$(clang-format --version | sed -e "s/.* //g") \
|
|
|
|
&& sed -i "s|clangFormat(.*).style|clangFormat(\"$VERSION\").style|g" build.gradle.kts \
|
|
|
|
&& ./gradlew jar \
|
|
|
|
&& mv *app/build/libs/*.jar /lightoidc.jar
|
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
RUN apk update \
|
|
|
|
&& apk add openjdk21-jre
|
|
|
|
COPY --from=build /lightoidc.jar /opt/lightoidc.jar
|
|
|
|
RUN adduser -S lightoidc \
|
|
|
|
&& mkdir /data /home/lightoidc/.config \
|
|
|
|
&& chown lightoidc /data /home/lightoidc/.config \
|
|
|
|
&& ln -s /data /home/lightoidc/.config/LightOIDC
|
|
|
|
|
|
|
|
USER lightoidc
|
|
|
|
ENTRYPOINT java -jar /opt/lightoidc.jar
|