First prototype of Dockerfile

This commit is contained in:
Jef Roosens 2021-12-30 22:28:24 +01:00
parent 26b2745e9b
commit 63af040a38
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
8 changed files with 97 additions and 1 deletions

33
Dockerfile Normal file
View file

@ -0,0 +1,33 @@
FROM archlinux:latest
ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-amd64-installer /tmp
# Install the s6 overlay, nginx
RUN chmod +x /tmp/s6-overlay-amd64-installer && \
/tmp/s6-overlay-amd64-installer / && \
pacman \
-Syu \
--noconfirm \
--needed \
python python-pip nginx && \
useradd -s /bin/false nginx && \
mkdir /data
ENV REPO_DIR=/data
# Install Python app
WORKDIR /usr/src/app
COPY requirements.txt app.py ./
RUN pip install -r requirements.txt && \
pacman -Rs --noconfirm python-pip
# Copy over s6 services files
COPY s6/services /etc/services.d
# Copy over nginx config file
COPY nginx.conf /etc/nginx/nginx.conf
# The entrypoint is the init script for s6
ENTRYPOINT ["/init"]
CMD ["nginx"]