goircd/Dockerfile
Mathias Kaufmann eeb6782f0f Added make targets to build and push docker images
Usage:
`make docker-image` to build the image
`make docker-image-push` to build and push the image

Signed-off-by: Mathias Kaufmann <me@stei.gr>
2018-03-14 00:10:00 +01:00

17 lines
383 B
Docker

FROM golang:1.10 AS goircd-builder
ARG PACKAGE=github.com/bbusse/goircd
ENV PACKAGE=$PACKAGE
WORKDIR /go/src/$PACKAGE/
ADD . /go/src/$PACKAGE/
RUN export CGO_ENABLED=0 \
&& go get $PACKAGE \
&& make -f GNUmakefile goircd \
&& mv goircd /go/bin/goircd
FROM alpine AS goircd
COPY --from=goircd-builder /go/bin/goircd /bin/goircd
ENTRYPOINT ["sh","-c"]
CMD ["exec goircd"]