-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (35 loc) · 956 Bytes
/
Dockerfile
File metadata and controls
43 lines (35 loc) · 956 Bytes
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
43
FROM golang:1.24.5-bookworm
# Instala dependências do sistema e do Chrome
RUN apt-get update && apt-get install -y \
wget \
gnupg \
ca-certificates \
fonts-liberation \
libappindicator3-1 \
libasound2 \
libatk-bridge2.0-0 \
libcups2 \
libgbm1 \
libgtk-3-0 \
libnspr4 \
libnss3 \
lsb-release \
xdg-utils && \
rm -rf /var/lib/apt/lists/*
# Instala o Google Chrome
RUN wget -q -O - https://dl.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/*
# Define diretório do app
WORKDIR /app
# Copia o projeto
COPY . .
# Resolve dependências
RUN go mod tidy
# Compila o binário
RUN go build -o server .
# Expõe a porta
EXPOSE 8080
# Executa
CMD ["./server"]