34 lines
804 B
Docker
34 lines
804 B
Docker
|
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"]
|