New in Docker. Need to write a Dockerfile according to requirements

How to write the docker file for the given requirements

  1. Use Ubuntu 16.04 as base image
  2. Container should have NginX 1.14.x and PHP 7.x
  3. Create a file named index.html with some dummy content
  4. Add this file at this working directory: /opt/projects
  5. Make this file accessible at
  6. Make the information about PHP’s configuration (<?php phpinfo(); ?>) accessible at
  8. NginX should write necessary access and error logs
  9. Mount NginX’s access and error log at host’s /var/log/nginx

I haven’t worked with PHP, but i made it in Python and Gunicorn, and you should try read how to make it, dont put in forums all your work. I hope it helps you.

FROM ubuntu:16.04

RUN mkdir -p /opt/projects

WORKDIR /opt/projects

RUN sudo apt install nginx && sudo apt install php7.0

COPY . /usr/src/app

ENTRYPOINT ["gunicorn"]
CMD ["-w", "2", "-b", ":8080", "app:app"]