Spaces:
Running
Running
File size: 628 Bytes
dc510b0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | FROM eclipse-temurin:17-jdk-alpine
LABEL maintainer="ERP System Team"
LABEL version="1.0.0"
LABEL description="ERP System with MongoDB, MySQL and PostgreSQL support"
RUN apk update && apk add --no-cache curl maven
WORKDIR /app
COPY pom.xml ./
COPY src/ ./src/
COPY start.sh ./start.sh
RUN mvn clean package -DskipTests
RUN addgroup -S spring && adduser -S spring -G spring \
&& chmod +x /app/start.sh \
&& chown -R spring:spring /app
USER spring
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=3s --start-period=60s --retries=3 \
CMD curl -f http://localhost:7860/ping || exit 1
CMD ["/bin/sh", "/app/start.sh"] |