Nginx-proxy and container

Hello, I want to create a dockerfile with wordpress, mysql, ftp and phpmyadmin. I want that the container hosts a web site. Both the customer and the container, I have a container nginx-proxy which is on the port 80. I do not know how to take myself there to create the dockerfile. can you help me? Thank’s

indent preformatted text by 4 spaces
  #Installation wordpress + apache2
  FROM php:5.6-apache

  #install the PHP extensions we need
  RUN set -ex; \
     apt-get update; \
     apt-get install -y \
	    libjpeg-dev \
	    libpng-dev \
       ; \
      rm -rf /var/lib/apt/lists/*; \
   docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
   docker-php-ext-install gd mysqli opcache
    #TODO consider removing the *-dev deps and only keeping the necessary lib* packages

    #set recommended PHP.ini settings
    RUN { \
      	echo 'opcache.memory_consumption=128'; \
    	echo 'opcache.interned_strings_buffer=8'; \
    	echo 'opcache.max_accelerated_files=4000'; \
   	  	echo 'opcache.revalidate_freq=2'; \
      	echo 'opcache.fast_shutdown=1'; \
      	echo 'opcache.enable_cli=1'; \
  	} > /usr/local/etc/php/conf.d/opcache-recommended.ini

    RUN a2enmod rewrite expires

    VOLUME /var/www/html

    ENV WORDPRESS_SHA1 6127bd2aed7b7c0a2c1789c8f17a2222a9081d6c

    RUN set -ex; \
       curl -o wordpress.tar.gz -fSL "${WORDPRESS_VERSION}.tar.gz"; \
       echo "$WORDPRESS_SHA1 *wordpress.tar.gz" | sha1sum -c -; \
          #upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress
       tar -xzf wordpress.tar.gz -C /usr/src/; \
       rm wordpress.tar.gz; \
       chown -R www-data:www-data /usr/src/wordpress

     COPY /usr/local/bin/

     ENTRYPOINT [""]
     CMD ["apache2-foreground"]

     #Installation Mysql
     FROM debian:jessie

     #add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
     RUN groupadd -r mysql && useradd -r -g mysql mysql

     #add gosu for easy step-down from root
     RUN set -x \
           && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \
           && wget -O /usr/local/bin/gosu 
"$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
           && wget -O /usr/local/bin/gosu.asc "$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
           && export GNUPGHOME="$(mktemp -d)" \
           && gpg --keyserver --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
           && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
           && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
           && chmod +x /usr/local/bin/gosu \
           && gosu nobody true \
           && apt-get purge -y --auto-remove ca-certificates wget

     RUN mkdir /docker-entrypoint-initdb.d

     #FATAL ERROR: please install the following Perl modules before executing /usr/local/mysql/scripts/mysql_install_db:
     RUN apt-get update && apt-get install -y perl pwgen --no-install-recommends && rm -rf /var/lib/apt/lists/*

     RUN set -ex; \
     #gpg: key 5072E1F5: public key "MySQL Release Engineering <>" imported
             key='A4A9406876FCBD3C456770C88C718D3B5072E1F5'; \
             export GNUPGHOME="$(mktemp -d)"; \
             gpg --keyserver --recv-keys "$key"; \
             gpg --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg; \
             rm -r "$GNUPGHOME"; \
             apt-key list > /dev/null

      ENV MYSQL_VERSION 5.6.38-1debian8

      RUN echo "deb jessie mysql-${MYSQL_MAJOR}" > /etc/apt/sources.list.d/mysql.list

       #the "/var/lib/mysql" stuff here is because the mysql-server postinst doesn't have an explicit way to disable the mysql_install_db codepath besides having a database already "configured" (ie, stuff in /var/lib/mysql/mysql)
       #also, we set debconf keys to make APT a little quieter
       RUN { \
	         echo mysql-community-server mysql-community-server/data-dir select ''; \
	         echo mysql-community-server mysql-community-server/root-pass password ''; \
	         echo mysql-community-server mysql-community-server/re-root-pass password ''; \
	         echo mysql-community-server mysql-community-server/remove-test-db select false; \
            } | debconf-set-selections \
       && apt-get update && apt-get install -y mysql-server="${MYSQL_VERSION}" && rm -rf /var/lib/apt/lists/* \
       && rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /var/run/mysqld \
       && chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \
       #ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime
       && chmod 777 /var/run/mysqld \
       #comment out a few problematic configuration values
       && find /etc/mysql/ -name '*.cnf' -print0 \
	   | xargs -0 grep -lZE '^(bind-address|log)' \
	   | xargs -rt -0 sed -Ei 's/^(bind-address|log)/#&/' \
       #don't reverse lookup hostnames, they are usually another container
       && echo '[mysqld]\nskip-host-cache\nskip-name-resolve' > /etc/mysql/conf.d/docker.cnf

       VOLUME /var/lib/mysql

       COPY /usr/local/bin/
       RUN ln -s usr/local/bin/ / # backwards compat
       ENTRYPOINT [""]

       EXPOSE 3306
       CMD ["mysqld"]

       #Installation FTP
       #FROM debian:jessie

       #feel free to change this;)
       MAINTAINER Andrew Stilliard <>

       #properly setup debian sources
       ENV DEBIAN_FRONTEND noninteractive
       RUN echo "deb jessie main\n\
       deb-src jessie main\n\
       deb jessie-updates main\n\
       deb-src jessie-updates main\n\
       deb jessie/updates main\n\
       deb-src jessie/updates main\n\
       " > /etc/apt/sources.list
       RUN apt-get -y update

       #install package building helpers
       RUN apt-get -y --force-yes --fix-missing install dpkg-dev debhelper

       #install dependancies
       RUN apt-get -y build-dep pure-ftpd

       #build from source
       RUN mkdir /tmp/pure-ftpd/ && \
                  cd /tmp/pure-ftpd/ && \
                  apt-get source pure-ftpd && \
                  cd pure-ftpd-* && \
                  ./configure --with-tls && \
                  sed -i '/^optflags=/ s/$/ --without-capabilities/g' ./debian/rules && \
                  dpkg-buildpackage -b -uc

        #install the new deb files
        RUN dpkg -i /tmp/pure-ftpd/pure-ftpd-common*.deb
        RUN apt-get -y install openbsd-inetd
        RUN dpkg -i /tmp/pure-ftpd/pure-ftpd_*.deb

        #Prevent pure-ftpd upgrading
        RUN apt-mark hold pure-ftpd pure-ftpd-common

        #setup ftpgroup and ftpuser
        RUN groupadd ftpgroup
        RUN useradd -g ftpgroup -d /home/ftpusers -s /dev/null ftpuser

        #rsyslog for logging (ref
        RUN apt-get install -y rsyslog && \
              echo "" >> /etc/rsyslog.conf && \
              echo "#PureFTP Custom Logging" >> /etc/rsyslog.conf && \
              echo "ftp.* /var/log/pure-ftpd/pureftpd.log" >> /etc/rsyslog.conf && \
              echo "Updated /etc/rsyslog.conf with /var/log/pure-ftpd/pureftpd.log"

         #setup run/init file
         COPY /
         RUN chmod u+x /

         #default publichost, you'll need to set this for passive support
         ENV PUBLICHOST localhost

         #couple available volumes you may want to use
         VOLUME ["/home/ftpusers", "/etc/pure-ftpd/passwd"]

         CMD / -c 5 -C 5 -l puredb:/etc/pure-ftpd/pureftpd.pdb -E -j -R -P $PUBLICHOST -p 30000:30009

         EXPOSE 21 30000-30009

         #Installation phpmyadmin
         FROM alpine:3.5

         #Install dependencies
         RUN apk add --no-cache php7-session php7-mysqli php7-mbstring php7-xml php7-gd php7-zlib php7-bz2 php7-zip php7-openssl php7-curl php7-opcache php7-json php7-ctype nginx php7-fpm supervisor

         #Include keyring to verify download
         COPY phpmyadmin.keyring /

         #Copy configuration
         COPY etc /etc/

         #Copy main script
         COPY /
         RUN chmod u+rwx /

         #Calculate download URL
         ENV VERSION 4.8+snapshot
         ENV URL${VERSION}-all-languages.tar.gz
         LABEL version=$VERSION

         #Download tarball, verify it using gpg and extract
         RUN set -x \
                && GNUPGHOME="$(mktemp -d)" \
                && export GNUPGHOME \
                && apk add --no-cache curl gnupg \
                && curl --output phpMyAdmin.tar.gz --location $URL \
                && apk del --no-cache curl gnupg \
                && rm -rf "$GNUPGHOME" \
                && tar xzf phpMyAdmin.tar.gz \
                && mv phpMyAdmin-$VERSION-all-languages /www \
                && rm -rf /www/setup/ /www/examples/ /www/test/ /www/po/ /www/composer.json /www/RELEASE-DATE-$VERSION \
                && sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /www/libraries/vendor_config.php \
                && chown -R root:nobody /www \
                && find /www -type d -exec chmod 750 {} \; \
                && find /www -type f -exec chmod 640 {} \;

          #Add directory for sessions to allow session persistence
          RUN mkdir /sessions

          #We expose phpMyAdmin on port 8080
          EXPOSE 8080

          ENTRYPOINT [ "/" ]
          CMD ["phpmyadmin"]