title: Why I can't launch the container with the image nginxphp in local
body: <p>I try to create an image from the image <code>jelastic/nginxphp:1.18.0-php-7.4.10</code> to set up my existing Laravel project (to then put on Jelastic cloud). However, when I try to access localhost I get a <code>ERR_EMPTY_RESPONSE</code> error.
  I also tried to create a container from the <code>jelastic/nginxphp:1.18.0-php-7.4.10</code> image but I have the same error</p>
  <p>my Dockerfile</p>
  <pre><code># ---------- Base ----------
  FROM jelastic/nginxphp:1.18.0-php-7.4.10 AS base
  
  # Set main params. The value local is equal to dev
  ARG user=runner
  ARG BUILD_ENV=local
  ARG BUILD_DEBUG=true
  ENV APP_HOME /var/www/webroot/ROOT
  ENV ENV=$BUILD_ARGUMENT_ENV
  ENV DEBUG_ENABLED=$BUILD_DEBUG
  
  # it's the same configuration as the basic one but with the following changes  
  # /var/www/webroot/ROOT -&gt; /var/www/webroot/ROOT/public
  COPY docker-conf/nginx/conf.d/nginx.conf /etc/nginx/nginx.conf
  
  # Enable PHP extension
  RUN yum install -y sed
  RUN sed -i &quot;s|;extension=pdo_mysql.so|extension=pdo_mysql.so|g&quot; /etc/php.ini
  
  # ---------- Builder ----------
  FROM base as build
  
  # Set working directory
  WORKDIR $APP_HOME
  
  COPY . .
  RUN if [ &quot;$BUILD_ARGUMENT_ENV&quot; = &quot;production&quot; ];then COMPOSER_MEMORY_LIMIT=-1 composer update --optimize-autoloader --no-interaction --no-progress --no-dev; \
      else COMPOSER_MEMORY_LIMIT=-1 composer update --optimize-autoloader --no-interaction --no-progress; \
      fi
  
  # Create system user
  RUN useradd -ms /bin/bash $user
  
  USER $user
  </code></pre>
  <p>the error produced</p>
  <p><a href="https://i.stack.imgur.com/uDShh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uDShh.png" alt="enter image description here" /></a></p>
  <p>When I lauch this commande <code>docker build -t myimage/backend .</code>, I have this result:</p>
  <pre><code>[+] Building 278.0s (13/13) FINISHED
   =&gt; [internal] load build definition from Dockerfile                                                                                                                                                                               0.0s
   =&gt; =&gt; transferring dockerfile: 32B                                                                                                                                                                                                0.0s
   =&gt; [internal] load .dockerignore                                                                                                                                                                                                  0.0s
   =&gt; =&gt; transferring context: 34B                                                                                                                                                                                                   0.0s
   =&gt; [internal] load metadata for docker.io/jelastic/nginxphp:1.18.0-php-7.4.10                                                                                                                                                     0.0s
   =&gt; [base 1/4] FROM docker.io/jelastic/nginxphp:1.18.0-php-7.4.10                                                                                                                                                                  0.0s
   =&gt; [internal] load build context                                                                                                                                                                                                  0.1s
   =&gt; =&gt; transferring context: 26.72kB                                                                                                                                                                                               0.1s
   =&gt; CACHED [base 2/4] COPY docker-conf/nginx/conf.d/nginx.conf /etc/nginx/nginx.conf                                                                                                                                               0.0s
   =&gt; [base 3/4] RUN yum install -y sed                                                                                                                                                                                             27.8s
   =&gt; [base 4/4] RUN sed -i &quot;s|;extension=pdo_mysql.so|extension=pdo_mysql.so|g&quot; /etc/php.ini                                                                                                                                        0.5s
   =&gt; [build-app 1/4] WORKDIR /var/www/webroot/ROOT                                                                                                                                                                                  0.0s
   =&gt; [build-app 2/4] COPY . .                                                                                                                                                                                                       0.1s
   =&gt; [build-app 3/4] RUN if [ &quot;$BUILD_ARGUMENT_ENV&quot; = &quot;production&quot; ];then COMPOSER_MEMORY_LIMIT=-1 composer update --optimize-autoloader --no-interaction --no-progress --no-dev;     else COMPOSER_MEMORY_LIMIT=-1 composer upd  245.9s
   =&gt; [build-app 4/4] RUN useradd -ms /bin/bash runner                                                                                                                                                                               0.5s
   =&gt; exporting to image                                                                                                                                                                                                             3.0s
   =&gt; =&gt; exporting layers                                                                                                                                                                                                            2.9s
   =&gt; =&gt; writing image sha256:98c32ac25564198547a767153df9c410467aabdf64c9115158c301272f2de3cc                                                                                                                                       0.0s
   =&gt; =&gt; naming to docker.io/myimage/backend  
  </code></pre>
  <p>Here is the command I use to create a container:</p>
  <pre><code>C:\Users\Myusername\Documents\projet&gt;docker run -dp 8000:80 myimage/backend
  c5c00082d17677bfb599decab892e18de468ab13380ed1d23a38cbf3c06511ee
  </code></pre>
  <p>When I lauch this command: <code>docker run -dp 8000:80 jelastic/nginxphp:1.18.0-php-7.4.10</code>, I have the same error</p>
  <p>here is my configuration file for the nginx server</p>
  <pre><code>#user  nobody;
  worker_processes  auto;
  worker_rlimit_nofile 2048;
  
  #load_module modules/ngx_http_modsecurity_module.so;
  
  error_log  /var/log/nginx/error.log;
  #error_log  logs/error.log  notice;
  #error_log  logs/error.log  info;
  
  #pid        logs/nginx.pid;
  
  
  events {
      worker_connections  2048;
  }
  
  
  http {
      server_tokens off;
      include       mime.types;
      default_type  application/octet-stream;
      client_max_body_size 100m;
  
      log_format  main  '$remote_addr:$http_x_remote_port - $remote_user [$time_local] &quot;$request&quot; '
                        '$status $body_bytes_sent &quot;$http_referer&quot; '
                        '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot; '
                        '&quot;$host&quot; sn=&quot;$server_name&quot; '
                        'rt=$request_time '
                        'ua=&quot;$upstream_addr&quot; us=&quot;$upstream_status&quot; '
                        'ut=&quot;$upstream_response_time&quot; ul=&quot;$upstream_response_length&quot; '
                        'cs=$upstream_cache_status' ;
  
      access_log  /var/log/nginx/access.log main;
  
      sendfile        on;
      #tcp_nopush     on;
  
      #keepalive_timeout  0;
      keepalive_timeout  65;
  
      gzip  on;
      gzip_types text/plain text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript;
  
      # Websocket support
      #upstream websocket {
      #    server 127.0.0.1:&lt;PORT&gt;;
      #}
  
      server {
          listen       80;
          listen       [::]:80;
          server_name  _;
  
          #charset koi8-r;
  
          access_log  /var/log/nginx/host.access.log;
          include /etc/nginx/aliases.conf;
  
          #location /ws {
          #    proxy_pass http://websocket;
          #    proxy_http_version 1.1;
          #    proxy_set_header Upgrade $http_upgrade;
          #    proxy_set_header Connection &quot;Upgrade&quot;;
          #}
          if ($http_x_remote_port = '' ) {
              set $http_x_remote_port $remote_port;
          }
  
          #modsecurity on;
          #modsecurity_rules_file /etc/nginx/conf.d/modsecurity/modsec_includes.conf;
  
          location / {
              root   /var/www/webroot/ROOT/public;
              index  index.html index.htm index.php;
  
              location ~ \.php$ {
                  location ~ /\. { deny all; access_log off; log_not_found off; }
                  include /etc/nginx/fastcgi_params;
                  fastcgi_pass unix:/var/run/php-fpm.socket;
                  fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                  fastcgi_param DOCUMENT_ROOT $realpath_root;
                  fastcgi_param PATH_INFO $fastcgi_script_name;
              }
  
          }
          index  index.php 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;
          }
  
          # proxy the PHP scripts to Apache listening on 127.0.0.1:80
          #
          location ~ \.php$ {
              proxy_pass   http://127.0.0.1;
          }
          location ~ ^/\.well-known {    root /var/www/webroot/ROOT;  allow all;}
          location ~ /\.well-known {       root /var/www/webroot;  allow all;}
      location ~ /\. { deny all; access_log off; log_not_found off; }
          # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
          #
          #location ~ \.php$ {
          #    root           html;
          #    fastcgi_pass   127.0.0.1:9000;
          #    fastcgi_index  index.php;
          #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
          #    include        fastcgi_params;
          #}
  
          # deny access to .htaccess files, if Apache's document root
          # concurs with nginx's one
          #
          #location ~ /\.ht {
          #    deny  all;
          #}
      location ~ \.php$ {
          location ~ /\. { deny all; access_log off; log_not_found off; }
          include /etc/nginx/fastcgi_params;
          fastcgi_pass unix:/var/run/php-fpm.socket;
          fastcgi_param SCRIPT_FILENAME /var/www/webroot$fastcgi_script_name;
          fastcgi_param PATH_INFO $fastcgi_script_name;
          fastcgi_param DOCUMENT_ROOT /var/www/webroot;
          }
  
      }
  
  include /etc/nginx/conf.d/*.conf;
  
  }
  </code></pre>