File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1- FROM python:3.9-slim-buster
1+ # ✅ 최신 LTS 기반 (debian bookworm)
2+ FROM python:3.11-slim
23
4+ ENV DEBIAN_FRONTEND=noninteractive
35WORKDIR /usr/src/app
46
5- # 의존성 먼저 설치 (캐시 활용)
7+ # 1) 시스템 패키지 (C/Java 컴파일용)
8+ RUN apt-get update && apt-get install -y --no-install-recommends \
9+ gcc g++ make openjdk-17-jdk-headless \
10+ && rm -rf /var/lib/apt/lists/*
11+
12+ # 2) 파이썬 의존성
613COPY requirements.txt ./
714RUN pip install --no-cache-dir -r requirements.txt
815
9- RUN apt-get update && apt-get install -y --no-install-recommends \
10- gcc g++ make openjdk-11-jdk-headless && \
11- rm -rf /var/lib/apt/lists/*
12-
13- # 앱 코드 복사
16+ # 3) 앱 코드/스크립트
1417COPY server/app.py .
1518COPY server/code ./code
16-
17- # 엔트리포인트 스크립트 복사
1819COPY docker/python/entrypoint.sh ./entrypoint_python.sh
1920COPY docker/java/entrypoint.sh ./entrypoint_java.sh
21+ # (C 스크립트가 있다면 추가) COPY docker/c/entrypoint.sh ./entrypoint_c.sh
2022RUN chmod +x entrypoint_*.sh
2123
22- # Python 버퍼링 비활성화
24+ # 4) 런타임 설정
2325ENV PYTHONUNBUFFERED=1
24-
2526EXPOSE 5050
26-
2727CMD ["python" , "-Xutf8" , "app.py" ]
You can’t perform that action at this time.
0 commit comments