-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
48 lines (33 loc) · 875 Bytes
/
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
FROM golang:1.22-alpine as builder
WORKDIR /app
COPY go.mod go.sum ./
RUN apk add --no-cache --virtual .build-deps \
ca-certificates \
tzdata \
gcc \
g++ && \
go mod download
COPY . .
RUN go build -ldflags "-s -w" -o auth
FROM alpine
# Installs latest Chromium package.
RUN apk add --no-cache \
chromium-swiftshader \
ttf-freefont \
font-noto-emoji \
&& apk add --no-cache \
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing \
font-wqy-zenhei
COPY local.conf /etc/fonts/local.conf
WORKDIR /app
COPY --from=builder /app/auth /app/
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY data data
ENV TZ=Asia/Shanghai
ENV MODE=production
RUN mkdir -p ./screenshots
RUN mkdir -p ./draw
VOLUME ["/app/screenshots"]
VOLUME ["/app/draw"]
EXPOSE 8000
ENTRYPOINT ["./auth"]