File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 1
1
FROM openjdk:17
2
2
3
+ # Chrome과 ChromeDriver 버전 고정
4
+ ENV CHROME_VERSION="115.0.5790.102-1"
5
+ ENV CHROMEDRIVER_VERSION="115.0.5790.102"
6
+
7
+ # Chrome 설치
8
+ RUN apt-get update && apt-get install -y wget unzip \
9
+ && wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
10
+ && apt-get install -y ./google-chrome-stable_${CHROME_VERSION}_amd64.deb \
11
+ && rm ./google-chrome-stable_${CHROME_VERSION}_amd64.deb
12
+
13
+ # ChromeDriver 설치
14
+ RUN wget -O /tmp/chromedriver.zip "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" \
15
+ && unzip /tmp/chromedriver.zip -d /usr/local/bin/ \
16
+ && chmod +x /usr/local/bin/chromedriver \
17
+ && rm /tmp/chromedriver.zip
18
+
19
+ # Xvfb 설치 및 환경 변수 설정
20
+ RUN apt-get install -y xvfb
21
+ ENV DISPLAY=:99
22
+
23
+ # Chrome과 ChromeDriver 경로 환경 변수 설정
24
+ ENV CHROME_BIN=/usr/bin/google-chrome
25
+ ENV CHROME_DRIVER=/usr/local/bin/chromedriver
26
+
3
27
ARG JAR_FILE=build/libs/*.jar
4
28
COPY ${JAR_FILE} app.jar
5
29
6
30
EXPOSE 8080
7
31
8
- ENTRYPOINT ["java " , "-jar " , "/app.jar" ]
32
+ ENTRYPOINT ["sh " , "-c " , "Xvfb :99 -ac & java -jar /app.jar" ]
You can’t perform that action at this time.
0 commit comments