Docker Initiates Mirror Error for Nginx?

  docker, question


FROM centos
 MAINTAINER salamander
 RUN yum install -y pcre-devel wget net-tools gcc zlib zlib-devel make openssl-devel
 # Add File
 RUN wget
 RUN tar -zxvf  nginx-1.12.1.tar.gz
 RUN mkdir -p /usr/local/nginx
 RUN cd nginx-1.12.1 && ./configure --prefix=/usr/local/nginx && make && make install
 ADD nginx.conf /usr/local/nginx/conf/nginx.conf
 # Expose ports
 CMD ["/usr/local/nginx/sbin/nginx -g 'daemon off;'  "]


#user  nginx;
 worker_processes 2;
 #pid        /var/run/;
 events {
 worker_connections  1024;
 http {
 include       mime.types;
 default_type  application/octet-stream;
 log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
 '$status $body_bytes_sent "$http_referer" '
 '"$http_user_agent" "$http_x_forwarded_for"';
 #access_log  /var/log/nginx/access.log  main;
 sendfile        on;
 #tcp_nopush     on;
 keepalive_timeout  65;
 gzip  on;
 server {
 listen       80;
 server_name  localhost;
 #charset koi8-r;
 #access_log  logs/host.access.log  main;
 location / {
 root   html;
 index   index.html  index.htm ;
 #error_page  404              /404.html;
 # redirect server error pages to the static page /50x.html
 error_page   500 502 503 504  /50x.html;
 location = /50x.html {
 root   html;

Error message

/usr/bin/ docker-current: Error response from daemon: invalid header field value “oci runtime error: container_linux.go:247: starting container process caused “e xec: \”/usr/local/nginx/sbin/nginx -g ‘daemon off;’ \”: stat /usr/local/nginx/sbin/nginx -g ‘daemon off;’ : no such file or directory”n”.

Is it not good to use nginx official image directly?