-
Notifications
You must be signed in to change notification settings - Fork 236
/
Dockerfile
31 lines (22 loc) · 640 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
###############################################################################
# BUILD STAGE
FROM golang:1.19-alpine AS build
RUN set -x \
&& apk --no-cache --update add \
bash \
ca-certificates \
curl \
git \
make
COPY . /app
WORKDIR /app
RUN set -x \
&& make -j 4 static
###############################################################################
# PACKAGE STAGE
FROM scratch
ENTRYPOINT ["/mtg"]
CMD ["run", "/config.toml"]
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /app/mtg /mtg
COPY --from=build /app/example.config.toml /config.toml