Passing params to docker run

I have a container that I run with the following command:

"docker run -p 3000:3000 -i --init --rm --cap-add=SYS_ADMIN --name codestrap-website node -e \"`cat server.js`\""

How can I pass the --cap-add=SYS_ADMIN and node -e \"cat server.js\" params to the docker run command in fly?

Could an entry script work?

I would allow me to start the node server. But --cap-add=SYS_ADMIN adds linux admin permissions required in my application (puppeteer). MAybe there is a way to add these permissions in the Dockerfile?

You should have full root access to your VMs by default. The arguments came to tweak Docker don’t apply to your app on Fly. Are you getting permission errors?

I get an Unable to open X display error without adding SYS_ADMIN. When google-chrome-stable is run it barfs about some permissions issue that ends up leading to this inability to locate it display. Under the hood I think puppeteer is trying to use xvfb.

I get an Unable to open X display error without adding SYS_ADMIN. When google-chrome-stable is run it barfs about some permissions issue that ends up leading to this inability to locate it display. Under the hood I think puppeteer is trying to use xvfb.

I think what is going on here is my setup starts puppeteer with Chrome using CMD ["google-chrome-stable"]. PUPPETEER_SKIP_CHROMIUM_DOWNLOAD is false. This enables full media support (at least that’s what I assume is happening). However your example app uses:

const browser = await puppeteer.launch(
      {
        executablePath: process.env.CHROME_BIN,

Does fly.io provide a Chrome bin? If so I can modify my setup for fly. However, it would be cool to be able to use the best practice container provided by Google.