building Apache with cosign filter and wsgi for django project inside a docker container

Hi I’m trying to build a docker container with apache2 and cosign and to configure it with wsgi for a django project .
I have created the following Dockerfile :

FROM ubuntu:16.04

RUN apt-get update
RUN apt-get install -y apt-utils vim curl apache2 apache2-utils
RUN apt-get -y install python3 libapache2-mod-wsgi-py3
RUN apt-get -y install postgresql postgresql-contrib pwgen

### install open ssl
RUN apt-get update \
    && apt-get install -y wget gcc libssl-dev=$OPENSSL_VERSION make openssl


### Build Cosign ###
RUN wget "$COSIGN_URL" \
  && mkdir -p src/cosign \
  && tar -xvf cosign-3.2.0.tar.gz -C src/cosign --strip-components=1 \
  && rm cosign-3.2.0.tar.gz \
  && cd src/cosign \
  && ./configure --enable-apache2=/usr/local/apache2/bin/apxs \
  && sed -i 's/remote_ip/client_ip/g' ./filters/apache2/mod_cosign.c \
  && make \
  && make install \
  && cd ../../ \
  && rm -r src/cosign \
  && mkdir -p /var/cosign/filter \
  && chmod 777 /var/cosign/filter

### Start script incorporates config files and sends logs to stdout ###
COPY start.sh .
RUN chmod +x start.sh
CMD /usr/local/apache2/start.sh


RUN ln /usr/bin/python3 /usr/bin/python
RUN apt-get -y install python3-pip
RUN ln /usr/bin/pip3 /usr/bin/pip
RUN pip install --upgrade pip
RUN pip install django ptvsd
ADD ./demo_site.conf /etc/apache2/sites-available/000-default.conf
EXPOSE 80 3500
CMD ["apache2ctl", "-D", "FOREGROUND"]

most of it its just copy past from teh internet I’m new to docker can anyone help me to figure out how I can build this .

  • Docker for windows10 run django fail: Can't open file 'manage.py': [Errno 2] No such file or directory
  • no django app created when following the docker-compose tutorial
  • Should nginx be packed into the same container as Django when deploying with Docker Swarm?
  • Why can't I `docker exec` after installing the official Django docker image?
  • Docker-compose trouble to mount local volume
  • Micro-components architecture with python / Django / Drf
  • Unable to set up Docker UCP cluster
  • Docker DNS issue on local machine
  • Docker installation issues on CentOS 7.1
  • WebApp from Windows to Docker Container
  • How can I launch an IronWorker with Docker without needing to pay for private Docker repositories, nor make my code public?
  • How can I numactl membind a process inside Docker container?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.