34 lines
904 B
Docker
34 lines
904 B
Docker
FROM fedora
|
|
|
|
LABEL maintainer="Jens Kleineheismann <heinzel@heinzelwelt.de>"
|
|
|
|
ARG APPLICATION_NAME=django-test
|
|
ARG APPLICATION_SRC=src/${APPLICATION_NAME}
|
|
|
|
RUN dnf -y update && \
|
|
dnf -y install procps-ng iproute net-tools && \
|
|
dnf -y install httpd && \
|
|
dnf -y install python3-mod_wsgi && \
|
|
dnf clean all
|
|
|
|
RUN chown apache: /etc/httpd/run && \
|
|
setcap 'cap_net_bind_service=+ep' /usr/sbin/httpd && \
|
|
sed -i -e 's:^\(\s.*\)\(CustomLog\s.*\)$:\1#\2:' \
|
|
/etc/httpd/conf/httpd.conf
|
|
|
|
COPY container-filesystem/ /
|
|
COPY ${APPLICATION_SRC} /srv/${APPLICATION_NAME}/src/${APPLICATION_NAME}
|
|
|
|
RUN ln -s ${APPLICATION_NAME} /srv/application && \
|
|
/setup-application.sh /srv/${APPLICATION_NAME} \
|
|
/srv/${APPLICATION_NAME}/src/${APPLICATION_NAME} && \
|
|
rm /setup-application.sh
|
|
|
|
EXPOSE 80/tcp
|
|
ENV LOG_LEVEL error
|
|
|
|
USER apache
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
CMD ["--"]
|