cf / Dockerfile
andhikagg's picture
Create Dockerfile
8f21c7c verified
raw
history blame contribute delete
568 Bytes
FROM node:latest
WORKDIR /app
RUN apt-get update && apt-get install -y \
git \
wget \
gnupg \
ca-certificates \
apt-transport-https \
chromium \
chromium-driver \
xvfb \
&& rm -rf /var/lib/apt/lists/*
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444 \
--mount=type=secret,id=GITHUB_REPO,mode=0444 \
git clone https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/$(cat /run/secrets/GITHUB_REPO).git /app
ENV CHROME_BIN=/usr/bin/chromium
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 7860
CMD ["npm", "start"]