From 1162afe0588666ea23583250d713a54950f4ceaf Mon Sep 17 00:00:00 2001 From: hen715 Date: Mon, 15 Apr 2024 22:48:12 +0900 Subject: [PATCH] =?UTF-8?q?[Refactor]=20=EB=8F=84=EC=BB=A4=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6aee5bc..6b7dd16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,26 @@ -FROM eclipse-temurin:17-jdk-alpine -# apk를 사용하여 필요한 패키지 설치 -RUN apk update \ - && apk add --no-cache chromium chromium-chromedriver curl unzip \ - && rm -rf /var/cache/apk/* +FROM eclipse-temurin:17-jdk + +# 필요한 도구 설치 +RUN apt-get update && apt-get install -y wget gnupg2 unzip curl && \ + apt-get clean + +# Google Chrome 설치 +RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \ + apt install -y ./google-chrome-stable_current_amd64.deb && \ + rm google-chrome-stable_current_amd64.deb + +# Chromedriver 설치 +RUN CHROMEDRIVER_VERSION=$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE) && \ + wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip && \ + unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/ && \ + rm /tmp/chromedriver.zip + +# 환경변수 설정 +ENV CHROME_BIN=/usr/bin/google-chrome +ENV CHROMEDRIVER_PATH=/usr/local/bin/chromedriver + +# 여기서부터 나머지 Dockerfile 구성을 계속하세요... + VOLUME /tmp #ARG JAR_FILE = ./build/libs/inu-portal-0.0.1-SNAPSHOT.jar