title: Apify with puppeteer in Docker root user problem
body: <p>I'm trying to use Apify in Docker container, but a strange error occurs</p>
  <p>Here's Dockerfile:</p>
  <pre><code>FROM apify/actor-node-chrome
  
  WORKDIR /app
  
  COPY . .
  
  USER root
  
  RUN ./setup.sh
  </code></pre>
  <p>here's setup.sh</p>
  <pre><code>#!/bin/bash
  
  rm -rf node_modules package-lock.json
  npm install
  npm run run
  </code></pre>
  <p>npm run run executes node index.js command
  Here's index.js</p>
  <pre><code>const crawler = new Apify.PuppeteerCrawler({
      requestQueue,
      handlePageFunction: async ({ ... }) =&gt; {
          ...
      },
      launchPuppeteerOptions:{
          headless: true
      }
  });
  
  await crawler.run();
  </code></pre>
  <p>In options I set headless to true
  When I run docker container, I get the next output:</p>
  <pre><code>Launching Puppeteer {&quot;headless&quot;:true,&quot;args&quot;:[&quot;--no-sandbox&quot;,&quot;--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36&quot;],&quot;timeout&quot;:15000,&quot;defaultViewport&quot;:{&quot;width&quot;:1366,&quot;height&quot;:768}}
  </code></pre>
  <p>Here we see that headless is true and args contains --no-sandbox</p>
  <p>But when crawling starts, I get this error:</p>
  <pre><code>(node:66) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
  [0721/143440.300775:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
  </code></pre>
  <p>The question is: why? (:</p>
  <p>--no-sandbox is set to true, why this error even occurs?</p>