ALFRED/Dockerfile

17 lines
471 B
Docker
Raw Normal View History

2020-11-10 19:37:11 +00:00
FROM golang:1.14 AS builder
RUN mkdir /build
WORKDIR /build
2019-07-23 20:15:42 +00:00
# Copy the code from the host and compile it
COPY . .
2018-07-23 15:04:06 +00:00
RUN mkdir res
COPY settings.json res
2018-11-13 23:35:25 +00:00
COPY quotes.json res
2018-07-23 15:04:06 +00:00
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /app .
2020-11-10 19:37:11 +00:00
FROM scratch
# We need ca-certifactes for http calls
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
2018-07-23 15:04:06 +00:00
COPY --from=builder /app ./
2020-11-10 19:37:11 +00:00
COPY --from=builder /build/res ./
2018-07-23 15:04:06 +00:00
ENTRYPOINT ["./app"]