-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (28 loc) · 893 Bytes
/
Dockerfile
File metadata and controls
37 lines (28 loc) · 893 Bytes
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
FROM alpine:3.23.4 AS build
ENV GRADLE_OPTS="-Dkotlin.incremental=false -Dorg.gradle.daemon=false -Dorg.gradle.vfs.watch=false -Dorg.gradle.logging.stacktrace=full"
RUN apk add --no-cache \
openjdk21 \
&& rm -rf /var/cache/* \
&& mkdir /var/cache/apk
WORKDIR /app
# Get the Gradle wrapper and cache the Gradle distribution first.
COPY gradlew settings.gradle ./
COPY gradle/wrapper ./gradle/wrapper
RUN ./gradlew --version
COPY gradle/libs.versions.toml ./gradle/libs.versions.toml
COPY build.gradle ./
COPY src/main ./src/main
RUN ./gradlew installDist
FROM alpine:3.23.4
VOLUME /config
VOLUME /data
RUN apk add --no-cache \
git \
openjdk8-jre-base \
tini \
&& rm -rf /var/cache/* \
&& mkdir /var/cache/apk
WORKDIR /app
COPY --from=build /app/build/install/gitout ./
ENTRYPOINT ["/sbin/tini", "--", "/app/bin/gitout"]
CMD ["/config/config.toml", "/data"]