Source code for the website
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

35 lignes
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" ]