Source code for the website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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