-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcron.Dockerfile
38 lines (22 loc) · 851 Bytes
/
cron.Dockerfile
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
29
30
31
32
33
34
35
36
37
38
FROM maven:3.9-eclipse-temurin-17 AS builder
WORKDIR /build
COPY pom.xml .
RUN mvn -B dependency:go-offline
COPY src ./src
RUN mvn package -o
FROM eclipse-temurin:17-jre-alpine
ARG SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/v0.2.27/supercronic-linux-amd64"
ARG SUPERCRONIC_SHA1SUM="7dadd4ac827e7bd60b386414dfefc898ae5b6c63"
ARG UID=1001
ARG GID=1001
ADD "${SUPERCRONIC_URL}" /usr/local/bin/supercronic
RUN echo "${SUPERCRONIC_SHA1SUM} /usr/local/bin/supercronic" | sha1sum -c -; \
chmod +x /usr/local/bin/supercronic \
addgroup -g "$GID" appuser; \
adduser -u "$UID" -G appuser -D appuser
USER appuser
WORKDIR /home/appuser
COPY --from=builder /build/target/*-with-dependencies.jar ./application.jar
COPY cron-entrypoint.sh .
ENTRYPOINT ["sh", "cron-entrypoint.sh"]
CMD ["-passthrough-logs"]