Skip to content

🎥 Make videos programmatically with React

using docker at root with pnpm

Matt Mcgillivray5c9f9b3e9410
diff --git a/.gitignore b/.gitignore
index 5b9b4bc471..44cf3121b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ packages/example/out
.vercel
packages/renderer/target
packages/gcp/src/remotion-lambda-gcp.code-workspace
+packages/gcp/chromium-x64/
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000..1949b82f8b
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,28 @@
+FROM node:alpine
+
+# RUN curl -f https://get.pnpm.io/v7.7.1.js | node - add --global pnpm
+ARG PNPM_VERSION=7.7.1
+RUN npm --no-update-notifier --no-fund --global install pnpm@${PNPM_VERSION}
+
+ADD ./packages/gcp/chromium-x64 /opt/bin/chromium
+
+ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
+ PUPPETEER_EXECUTABLE_PATH=/opt/bin/chromium
+
+WORKDIR /usr/app
+
+# Instructions from PNPM docs for using Docker - https://pnpm.io/cli/fetch
+COPY pnpm-lock.yaml ./
+RUN pnpm fetch
+
+COPY ./packages/gcp/package*.json ./
+COPY ./packages/gcp/tsconfig.json ./
+COPY ./packages/gcp/src src
+
+RUN pnpm i && pnpm build
+# RUN npm i
+
+EXPOSE 8080
+
+CMD ["pnpm", "run", "start"]
+# CMD ["npm", "run", "start"]
\ No newline at end of file