-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (33 loc) · 936 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
FROM golang:alpine as golang
WORKDIR /go/src/policebot
COPY . .
RUN apk --no-cache add \
tzdata \
zip \
ca-certificates \
opus-tools \
ffmpeg \
build-base \
git \
pkgconf \
opus-dev
RUN go build -ldflags="-w -s" -o policebot
# RUN chmod +x policebot
#FROM alpine:latest as alpine
#RUN apk --no-cache add tzdata zip ca-certificates opus-tools
#WORKDIR /usr/share/zoneinfo
## -0 means no compression. Needed because go's
## tz loader doesn't handle compressed data.
#RUN zip -r -0 /zoneinfo.zip .
#FROM scratch
## the test program:
#COPY --from=golang /go/src/policebot/policebot /policebot
#COPY --from=golang /go/src/policebot/assets /assets
## the timezone data:
#ENV ZONEINFO /zoneinfo.zip
#COPY --from=alpine /zoneinfo.zip /
## the tls certificates:
#COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
#ENV DISCORD_TOKEN = ""
RUN chmod +x ./policebot
CMD ["./policebot"]