Monde de merde
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-05-09 00:09:51 +02:00
commit af08e14b88
9 changed files with 1596 additions and 0 deletions

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM golang:1.14 AS builder
RUN mkdir /build
WORKDIR /build
# Copy the code from the host and compile it
COPY . .
RUN go build
RUN mkdir res
COPY quotes.json res/quotes.json
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /app .
# We use Alpine for it's ca-certificates needed by http lib
FROM alpine:latest
RUN apk add --no-cache ca-certificates apache2-utils
COPY --from=builder /app ./
COPY --from=builder /build/res ./
ENTRYPOINT ["./app"]