Add dockerfile

This commit is contained in:
Michael Aldridge 2020-11-09 18:27:44 -08:00
parent 44d8cee507
commit 55b4034696

9
Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM golang:1.15 as build
WORKDIR /netauth/ldap
COPY . .
RUN go mod vendor && \
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o /ldapd .
FROM scratch
ENTRYPOINT ["/ldapd"]
COPY --from=build /ldapd /ldapd