ALFRED/Dockerfile

17 lines
471 B
Docker

FROM golang:1.14 AS builder
RUN mkdir /build
WORKDIR /build
# Copy the code from the host and compile it
COPY . .
RUN mkdir res
COPY settings.json res
COPY quotes.json res
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /app .
FROM scratch
# We need ca-certifactes for http calls
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /app ./
COPY --from=builder /build/res ./
ENTRYPOINT ["./app"]