forked from NathanConde-dev/google-maps-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (35 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
42 lines (35 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM node:18
# Instalar dependências do sistema necessárias para o Puppeteer e Chrome
RUN apt-get update && apt-get install -y \
wget \
gnupg \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libgbm1 \
libasound2 \
libpangocairo-1.0-0 \
libxss1 \
libgtk-3-0 \
libxshmfence1 \
libglu1 \
fonts-liberation \
libappindicator3-1 \
xdg-utils && \
rm -rf /var/lib/apt/lists/*
# Baixar e instalar o Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
apt-get update && apt-get install -y google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
# Configurar diretório de trabalho
WORKDIR /app
# Copiar arquivos do projeto
COPY . .
# Instalar dependências do Node.js
RUN npm install
# Expor a porta do servidor
EXPOSE 3000
# Comando de inicialização
CMD ["npm", "start"]