vail/build/Dockerfile

12 lines
257 B
Docker
Raw Normal View History

2021-07-31 09:17:27 -06:00
FROM golang:1 AS builder
COPY . /src
COPY static /target/static
2021-07-31 10:09:08 -06:00
WORKDIR /src
RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' ./...
2021-07-31 09:17:27 -06:00
RUN cp -r /go/bin /target
FROM scratch
COPY --from=builder /target /
ENTRYPOINT [ "/bin/vail" ]