FROM openjdk:17-slim RUN useradd -m zfileuser RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/* WORKDIR /app RUN curl -L -o zfile-4.1.5.jar https://github.com/zfile-dev/zfile/releases/download/4.1.5/zfile-4.1.5.jar RUN curl -L -o cfg.zip https://github.com/twhite-gh/twhite-gh/raw/refs/heads/main/cfg.zip RUN chown zfileuser:zfileuser zfile-4.1.5.jar RUN --mount=type=secret,id=ZIP_PWD,mode=0444,required=true unzip -P $(cat /run/secrets/ZIP_PWD) cfg.zip #RUN cp -f application.properties /app/application.properties RUN ls RUN pwd USER zfileuser EXPOSE 8080 CMD ["java", "-jar", "/app/zfile-4.1.5.jar", "--spring.config.location=file:/app/application.properties"]