title: How to install nginx 1.14.X inside docker?
body: <pre><code># 1. use ubuntu 16.04 as base image
  FROM ubuntu:16.04
  
  # defining user root
  USER root
  
  # OS update
  RUN apt-get update
  
  # Installing PHP and NginX
  RUN apt-get install -y nginx=1.4.* php7.0
  
  # Remove the default Nginx configuration file
  RUN rm -v /etc/nginx/nginx.conf
  
  # Copy a configuration file from the current directory
  ADD nginx.conf /etc/nginx/
  
  ADD web /usr/share/nginx/html/
  
  # Append "daemon off;" to the beginning of the configuration
  RUN echo "daemon off;" &gt;&gt; /etc/nginx/nginx.conf
  
  # Expose ports
  EXPOSE 90
  
  # Set the default command to execute
  # when creating a new container
  CMD service nginx start
  </code></pre>
  
  <p>This is my Dockerfile. I want to Install 1.14.2 of Nginx but Error occurs:</p>
  
  <pre><code>E: Version '1.4.*' for 'nginx' was not found.
  </code></pre>
  
  <p>How can I install specific version of nginx inside docker this way?</p>