title: docker: can not start xvfb-run with docker run, but can start with docker exec -it
body: <p>I'm trying to run a node app with <code>xvfb-run</code>, here is my Dockerfile</p>
  <pre><code>FROM node:lts-alpine
  
  RUN apk --no-cache upgrade &amp;&amp; apk add --no-cache chromium coreutils xvfb xvfb-run
  
  ENV CHROME_BIN=&quot;/usr/bin/chromium-browser&quot;\
    PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=&quot;true&quot; \
    UPLOAD_ENV=&quot;test&quot;
  
  WORKDIR /app
  
  COPY  package.json .
  COPY  .npmrc .
  
  RUN npm install
  
  COPY . .
  
  # EXPOSE 9999
  
  ENTRYPOINT xvfb-run -a npm run dev
  </code></pre>
  <p>I can successfully build the image, but when I run it with <code>docker run</code>, it gets stuck without any log</p>
  <p><a href="https://i.stack.imgur.com/JdV53.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JdV53.png" alt="enter image description here" /></a></p>
  <p>But when I open an interactive shell and run the ENTRYPOINT command, it works...</p>
  <p><a href="https://i.stack.imgur.com/SEgYj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SEgYj.png" alt="enter image description here" /></a></p>
  <p>How do I fix it?</p>