Skip to content

Commit 81c0e86

Browse files
authored
Update Dockerfile
1 parent b315471 commit 81c0e86

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
FROM python:3.9-slim-buster
1+
# ✅ 최신 LTS 기반 (debian bookworm)
2+
FROM python:3.11-slim
23

4+
ENV DEBIAN_FRONTEND=noninteractive
35
WORKDIR /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) 파이썬 의존성
613
COPY requirements.txt ./
714
RUN 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) 앱 코드/스크립트
1417
COPY server/app.py .
1518
COPY server/code ./code
16-
17-
# 엔트리포인트 스크립트 복사
1819
COPY docker/python/entrypoint.sh ./entrypoint_python.sh
1920
COPY docker/java/entrypoint.sh ./entrypoint_java.sh
21+
# (C 스크립트가 있다면 추가) COPY docker/c/entrypoint.sh ./entrypoint_c.sh
2022
RUN chmod +x entrypoint_*.sh
2123

22-
# Python 버퍼링 비활성화
24+
# 4) 런타임 설정
2325
ENV PYTHONUNBUFFERED=1
24-
2526
EXPOSE 5050
26-
2727
CMD ["python", "-Xutf8", "app.py"]

0 commit comments

Comments
 (0)