File size: 518 Bytes
b7a937b
06da17b
b7a937b
 
 
 
06da17b
b7a937b
 
06da17b
b7a937b
 
06da17b
b7a937b
 
06da17b
 
 
b7a937b
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.10

# ν•„μš”ν•œ νŒ¨ν‚€μ§€ μ„€μΉ˜ (μ—¬κΈ°μ„œλŠ” git 포함)
RUN apt-get update \
    && apt-get install -y git \
    && rm -rf /var/lib/apt/lists/*

# non-root μ‚¬μš©μž 생성
RUN useradd -m myuser

# μž‘μ—… 디렉토리 μ„€μ •
WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# 파일 μ†Œμœ κΆŒ λ³€κ²½
RUN chown -R myuser:myuser /app


COPY entrypoint.sh entrypoint.sh
RUN chmod +x entrypoint.sh

# μ‚¬μš©μž λ³€κ²½
USER myuser

CMD ["./entrypoint.sh"]