-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (25 loc) · 927 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
############################
# Docker build environment #
############################
FROM golang:alpine AS build
WORKDIR /build
COPY . .
RUN go mod tidy && \
go build -o bonjourmadame-api-server
############################
# Docker final environment #
############################
FROM scratch
LABEL name="BonjourMadame API Server" \
website="https://bonjourmadame.xorhak.fr" \
repository="https://github.com/djerfy/bonjourmadame-api-server" \
maintainer="Djerfy <djerfy@gmail.com>" \
contributor="Azrod <contact@mickael-stanislas.com>"
WORKDIR /app
ENV VERSION="2.0.3"
ENV GIN_MODE="release"
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /build/bonjourmadame-api-server ./bonjourmadame-api-server
COPY --from=build /build/resources/static ./static
COPY --from=build /build/resources/templates ./templates
CMD ["/app/bonjourmadame-api-server"]