Files
boringproxy/Dockerfile
Felix Bartels eacc0094aa Use multi stage dockerfile for building
This also adds a docker-compose.yml for easy running and rebuilding

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-10-31 19:11:11 -04:00

22 lines
321 B
Docker

FROM golang:1.15-alpine3.12 as builder
WORKDIR /build
RUN apk add git
RUN go get github.com/GeertJohan/go.rice/rice
COPY go.* ./
RUN go mod download
COPY . .
RUN rice embed-go
RUN CGO_ENABLED=0 go build
FROM scratch
EXPOSE 80 443
COPY --from=builder /build/boringproxy /
ENTRYPOINT ["/boringproxy"]
CMD ["server"]