Add Dockerfile

This commit is contained in:
Maxim Baz 2018-07-30 01:02:57 +02:00
parent 823af68923
commit 1171909046
No known key found for this signature in database
GPG Key ID: 011FDC52DA839335

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
# Compile
FROM golang:alpine AS build
ADD . /go/src/github.com/mpolden/ipd
WORKDIR /go/src/github.com/mpolden/ipd
RUN apk --update add git
RUN go get -d -v ./...
RUN go install ./...
# Run
FROM alpine
RUN mkdir -p /opt/
COPY --from=build /go/bin/ipd /opt/
WORKDIR /opt/
ENTRYPOINT ["/opt/ipd"]