🎥 Make videos programmatically with React
Improve Docker instructions
Jonny Burgerfef83552b324
diff --git a/packages/docs/docs/docker.mdx b/packages/docs/docs/docker.mdxindex 2815d50d40..f004660855 100644--- a/packages/docs/docs/docker.mdx+++ b/packages/docs/docs/docker.mdx@@ -11,8 +11,21 @@ We recommend the following structure for your Dockerfile. Read below about the i```docker title="Dockerfile"FROM node:20-bookworm+# Install Chrome dependenciesRUN apt-get update-RUN apt-get install -y chromium+RUN apt install -y \+ libnss3 \+ libdbus-1-3 \+ libatk1.0-0 \+ libgbm-dev \+ libasound2 \+ libxrandr2 \+ libxkbcommon-dev \+ libxfixes3 \+ libxcomposite1 \+ libxdamage1 \+ libatk-bridge2.0-0 \+ libcups2# Copy everything from your project to the Docker image. Adjust if needed.COPY package.json package*.json yarn.lock* pnpm-lock.yaml* bun.lockb* tsconfig.json* remotion.config.* ./@@ -24,6 +37,9 @@ COPY public ./public# Install the right package manager and dependencies - see below for Yarn/PNPMRUN npm i+# Install Chrome+RUN npx remotion browser ensure+# Run your applicationCOPY render.mjs render.mjsCMD ["node", "render.mjs"]@@ -45,15 +61,28 @@ This Dockerfile is unable to render WebGL content. Suggestions on how to improve</p>```docker-FROM debian:bookworm+FROM node:20-bookworm```<p>- <Step>2</Step> Update the package lists on the Debian system.+ <Step>2</Step> Update the package lists on the Debian system and install the needed [shared libraries](/docs/miscellaneous/linux-dependencies) for Chrome Headless Shell.</p>```dockerRUN apt-get update+RUN apt install -y \+ libnss3 \+ libdbus-1-3 \+ libatk1.0-0 \+ libgbm-dev \+ libasound2 \+ libxrandr2 \+ libxkbcommon-dev \+ libxfixes3 \+ libxcomposite1 \+ libxdamage1 \+ libatk-bridge2.0-0 \+ libcups2```<p>@@ -103,7 +132,15 @@ COPY public ./public```<p>- <Step>6</Step> Run your code. It can be a CLI command or a Node.JS app.+ <Step>6</Step> Install [Chrome Headless Shell](/docs/miscellaneous/chrome-headless-shell).+</p>++```docker+RUN npx remotion browser ensure+```++<p>+ <Step>7</Step> Run your code. It can be a CLI command or a Node.JS app.</p>```docker