Source code for the website
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

35 行
1.0 KiB

FROM debian:10.4-slim
# Taken from the docker compose django docs...
RUN apt-get update \
&& apt-get install -y --force-yes \
git python3 python3-dev python3-pip python3-yaml postgresql-client-11
RUN mkdir app
# Copy the requirements file first and do those installs before copying over the application code.
# This prevents the pip install step from running when it doesn't need to...
COPY requirements.txt .
RUN python3 -m pip install -r requirements.txt
# Now copy everything...
COPY . .
EXPOSE 8000/tcp
RUN export user=momw home=/home/momw uid=1000 gid=1000 && \
mkdir -p ${home} && \
echo "${user}:x:${uid}:${gid}:${user},,,:${home}:/bin/bash" >> /etc/passwd && \
echo "${user}:x:${uid}:" >> /etc/group && \
chown ${uid}:${gid} -R ${home} /app
USER momw
# The app will run but there will be no data. See this URL for details:
CMD [ "make", "PORT=8000" ]