narrative_api / Dockerfile
MJSHIN0122's picture
์ดˆ๊ธฐํ™”
b7a937b
Raw History Blame Contribute Delete
518 Bytes
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"]