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 ###
RUN chmod +x
CMD /usr/local/apache2/

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 .

  • Simple Docker image running Apache won't start up on Centos 7.2
  • How to translate docker-compose.yml to for Django
  • Linking Django and Postgresql with Docker
  • Docker compose install requirements in a shared directory
  • Docker apache2 will not consider new 000-default.conf
  • Starting fig process with supervisor
  • Restarting Couchbase inside a Docker container
  • Sensu-Client inside Docker container
  • ElasticSearch in docker
  • Having trouble getting docker to work on mac
  • OSX 10.11.3 Install gitlab server using docker
  • Docker --link not adding two entries to hosts file
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.