-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (42 loc) · 1.12 KB
/
Dockerfile
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
44
45
46
47
48
49
# build step
FROM golang:latest
# System setup
ENV DEBIAN_FRONTEND=noninteractive \
TERM=xterm \
TIMEZONE=UTC \
GO111MODULE=on
# Install deps + add Chrome Stable + purge all the things
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
--no-install-recommends \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb https://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 \
fontconfig \
fonts-ipafont-gothic \
fonts-wqy-zenhei \
fonts-thai-tlwg \
fonts-kacst \
fonts-symbola \
fonts-noto \
--no-install-recommends \
&& apt-get purge --auto-remove -y curl gnupg \
&& rm -rf /var/lib/apt/lists/*
# Create app directory
WORKDIR /app
# args
ARG FERRET_TAG=v0.15.0
COPY . .
RUN go get github.com/gobs/args
RUN go get github.com/raff/godet
RUN export GO111MODULE=on
RUN go mod init ferret
RUN go get github.com/MontFerret/ferret@${FERRET_TAG}
RUN go build -o main .
EXPOSE 8080
# Command to run the executable
CMD ["./main"]