최초 프로젝트 업로드 (Script Auto Commit)
This commit is contained in:
37
Dockerfile
Normal file
37
Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
# Synology DSM용 MACD 알림 봇 Dockerfile
|
||||
FROM python:3.12-slim
|
||||
|
||||
# 필수 패키지 및 로케일 설치
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
locales \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 한글 및 UTF-8 로케일 설정
|
||||
RUN sed -i '/ko_KR.UTF-8/s/^# //g' /etc/locale.gen && \
|
||||
locale-gen ko_KR.UTF-8
|
||||
ENV LANG=ko_KR.UTF-8
|
||||
ENV LC_ALL=ko_KR.UTF-8
|
||||
|
||||
# 타임존 설정 (서울)
|
||||
ENV TZ=Asia/Seoul
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 1. requirements.txt만 먼저 복사
|
||||
COPY requirements.txt .
|
||||
|
||||
# 2. 라이브러리를 먼저 설치 (이 단계가 캐시됨)
|
||||
RUN pip install --no-cache-dir --upgrade pip \
|
||||
&& pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# COPY . /app
|
||||
|
||||
RUN mkdir -p logs
|
||||
|
||||
CMD ["python", "main.py"]
|
||||
|
||||
# 필요시 포트 노출
|
||||
# EXPOSE 8000
|
||||
Reference in New Issue
Block a user