summaryrefslogtreecommitdiff
path: root/Dockerfile.golang
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile.golang')
-rw-r--r--Dockerfile.golang17
1 files changed, 17 insertions, 0 deletions
diff --git a/Dockerfile.golang b/Dockerfile.golang
new file mode 100644
index 0000000..df1bf9d
--- /dev/null
+++ b/Dockerfile.golang
@@ -0,0 +1,17 @@
+FROM golang:1.10 as build
+WORKDIR /go/src/pwman
+RUN go get -d -v gopkg.in/ldap.v2 github.com/gorilla/csrf gopkg.in/jcmturner/gokrb5.v5/client gopkg.in/jcmturner/gokrb5.v5/config
+COPY *.go ./
+
+RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o pwman .
+
+FROM alpine:latest
+RUN apk --no-cache add ca-certificates
+WORKDIR /opt
+COPY --from=build /go/src/pwman/pwman /usr/local/bin/
+COPY create-kdc-principal.pl .
+COPY krb5.conf .
+COPY static static
+COPY templates templates
+
+CMD ["pwman"]