Files
fg-auto/build/Dockerfile
2025-06-24 17:02:50 +09:00

29 lines
1.1 KiB
Docker

FROM ubuntu:22.04
# 패키지 설치
RUN apt-get update && \
apt-get install -y python3 python3-pip cron curl unzip wget xvfb \
libglib2.0-0 libnss3 libgconf-2-4 libfontconfig1 libxss1 libxshmfence1 \
libasound2 libxtst6 libappindicator3-1 fonts-liberation libu2f-udev && \
pip3 install pymysql ftputil pillow selenium
# 크롬 및 드라이버 설치
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
apt-get install -y ./google-chrome-stable_current_amd64.deb && \
rm google-chrome-stable_current_amd64.deb
RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') && \
wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/${CHROME_VERSION}/chromedriver_linux64.zip && \
unzip /tmp/chromedriver.zip -d /usr/local/bin && \
chmod +x /usr/local/bin/chromedriver && \
rm /tmp/chromedriver.zip
# 작업 디렉토리 설정
WORKDIR /data
# 크론탭 등록
COPY ./build/crontab.txt /etc/cron.d/autoupload-cron
RUN chmod 0644 /etc/cron.d/autoupload-cron && \
crontab /etc/cron.d/autoupload-cron
CMD ["cron", "-f"]