-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (14 loc) · 690 Bytes
/
Dockerfile
File metadata and controls
25 lines (14 loc) · 690 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
# Stage 1: Build the application
FROM krmp-d2hub-idock.9rum.cc/goorm/gradle:7.3.1-jdk17 as build
WORKDIR /home/gradle/project
COPY . .
RUN echo "systemProp.http.proxyHost=krmp-proxy.9rum.cc\nsystemProp.http.proxyPort=3128\nsystemProp.https.proxyHost=krmp-proxy.9rum.cc\nsystemProp.https.proxyPort=3128" > /root/.gradle/gradle.properties
RUN gradle build -x test
# Stage 2: Run the application
FROM krmp-d2hub-idock.9rum.cc/goorm/eclipse-temurin:17-jre
WORKDIR /opt/techcampus
COPY --from=build /home/gradle/project/build/libs/kakao-0.0.1-SNAPSHOT.jar .
USER nobody
EXPOSE 8080
ENV DATABASE_URL=jdbc:mariadb://localhost:3306/kakao
CMD ["java", "-jar", "kakao-0.0.1-SNAPSHOT.jar"]