fastfact/Dockerfile
2024-12-04 23:39:07 +00:00

20 lines
255 B
Docker

FROM golang:alpine AS builder
WORKDIR /app
COPY go.mod ./
COPY template.html ./
COPY facts.txt ./
COPY main.go ./
RUN go build -o fastfact .
FROM alpine:latest
COPY --from=builder /app/fastfact /usr/local/bin/fastfact
EXPOSE 8080
CMD ["fastfact"]