mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 17:24:02 +03:00
FILE / ScuroNeko/mtg
Dockerfile
Исходный файл и его история в репозитории.
32 lines
640 B
Docker
32 lines
640 B
Docker
###############################################################################
|
|
# BUILD STAGE
|
|
|
|
FROM golang:1.16-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
|