summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 8660b079b3e74b18ae8ff8a8d4ec0017f5191357 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 github.com/namsral/flag
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
FROM ubuntu:16.04
RUN apt-get update && \
    apt-get install -y libheimdal-kadm5-perl
WORKDIR /opt
COPY --from=build /go/src/pwman/pwman /usr/local/bin/
COPY krb5.conf /etc/krb5.conf
COPY scripts scripts
COPY static static
COPY templates templates
ENV KRB5_CONF=/etc/krb5.conf

CMD ["pwman"]