Dockerfile Update
This commit is contained in:
@ -1,41 +1,31 @@
|
|||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
ENV LANG=ko_KR.UTF-8
|
LANG=ko_KR.UTF-8 \
|
||||||
ENV LANGUAGE=ko_KR:ko
|
LANGUAGE=ko_KR:ko \
|
||||||
ENV LC_ALL=ko_KR.UTF-8
|
LC_ALL=ko_KR.UTF-8
|
||||||
|
|
||||||
# 기본 패키지 설치 및 한글 로케일 구성
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
locales bash tzdata && \
|
locales tzdata bash python3 python3-pip cron curl unzip wget gnupg ca-certificates \
|
||||||
|
xvfb x11-utils libglib2.0-0 libnss3 libgconf-2-4 libfontconfig1 \
|
||||||
|
libxss1 libxshmfence1 libasound2 libxtst6 libappindicator3-1 \
|
||||||
|
fonts-nanum libu2f-udev && \
|
||||||
locale-gen ko_KR.UTF-8 && \
|
locale-gen ko_KR.UTF-8 && \
|
||||||
ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \
|
ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \
|
||||||
dpkg-reconfigure --frontend noninteractive tzdata
|
dpkg-reconfigure --frontend noninteractive tzdata && \
|
||||||
|
ln -sf /usr/bin/python3 /usr/bin/python && \
|
||||||
|
curl -fsSL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o chrome.deb && \
|
||||||
|
apt-get install -y ./chrome.deb && rm chrome.deb && \
|
||||||
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
# 시스템 필수 패키지 및 Chrome 설치
|
RUN pip3 install --no-cache-dir selenium>=4.10 pymysql ftputil pillow pyvirtualdisplay requests
|
||||||
RUN apt-get install -y --no-install-recommends \
|
|
||||||
python3 python3-pip cron curl unzip wget gnupg ca-certificates \
|
|
||||||
xvfb x11-utils libglib2.0-0 libnss3 libgconf-2-4 libfontconfig1 \
|
|
||||||
libxss1 libxshmfence1 libasound2 libxtst6 libappindicator3-1 \
|
|
||||||
fonts-nanum libu2f-udev && \
|
|
||||||
ln -s /usr/bin/python3 /usr/bin/python && \
|
|
||||||
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 && \
|
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Python 패키지 설치
|
|
||||||
RUN pip3 install --no-cache-dir \
|
|
||||||
selenium>=4.10 pymysql ftputil pillow pyvirtualdisplay
|
|
||||||
|
|
||||||
# 작업 디렉토리
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
# 크론탭 설정
|
RUN fc-cache -f -v
|
||||||
COPY ./build/crontab.txt /etc/cron.d/autoupload-cron
|
|
||||||
RUN chmod 0644 /etc/cron.d/autoupload-cron && \
|
COPY ./build/crontab.txt /etc/cron.d/autoupload-cron
|
||||||
crontab /etc/cron.d/autoupload-cron
|
RUN chmod 0644 /etc/cron.d/autoupload-cron && crontab /etc/cron.d/autoupload-cron
|
||||||
|
|
||||||
# 기본 명령
|
|
||||||
CMD ["cron", "-f"]
|
CMD ["cron", "-f"]
|
||||||
|
|||||||
Reference in New Issue
Block a user