1FROM golang:1.10.1-alpine 2 3RUN apk add --update git gcc libc-dev 4 5# Pin to the specific v3.0.0 version 6RUN go get -tags 'mysql postgres file' github.com/mattes/migrate/cli && mv /go/bin/cli /go/bin/migrate 7 8ENV NOTARYPKG github.com/theupdateframework/notary 9 10# Copy the local repo to the expected go path 11COPY . /go/src/${NOTARYPKG} 12 13WORKDIR /go/src/${NOTARYPKG} 14 15RUN chmod 0600 ./fixtures/database/* 16 17ENV SERVICE_NAME=notary_server 18EXPOSE 4443 19 20# Install notary-server 21RUN go install \ 22 -tags pkcs11 \ 23 -ldflags "-w -X ${NOTARYPKG}/version.GitCommit=`git rev-parse --short HEAD` -X ${NOTARYPKG}/version.NotaryVersion=`cat NOTARY_VERSION`" \ 24 ${NOTARYPKG}/cmd/notary-server && apk del git gcc libc-dev && rm -rf /var/cache/apk/* 25 26ENTRYPOINT [ "notary-server" ] 27CMD [ "-config=fixtures/server-config-local.json" ] 28