stusys / Dockerfile
dvc890's picture
Update Dockerfile
9cfc9f6
raw
history blame contribute delete
467 Bytes
# Final running image
FROM eclipse-temurin:17-jre-alpine
WORKDIR /app
RUN mkdir -p /app
COPY ./*.jar /app/app.jar
# Environment variables
RUN --mount=type=secret,id=MONGO_USERNAME,mode=0444,required=true
RUN --mount=type=secret,id=MONGO_PASSWORD,mode=0444,required=true
RUN --mount=type=secret,id=MONGO_DATABASE,mode=0444,required=true
RUN --mount=type=secret,id=MONGO_AUTH_DB,mode=0444,required=true
# Expose ports
EXPOSE 8080
CMD ["java", "-jar", "app.jar"]