2016-09-12 13:58:14 +02:00
|
|
|
# Run mop-tracker in a container
|
|
|
|
#
|
|
|
|
# docker run -it --rm \
|
2016-09-12 20:26:36 +02:00
|
|
|
# -v ~/.moprc:/root/.moprc \
|
|
|
|
# --name mop \
|
|
|
|
# r.j3ss.co/mop
|
|
|
|
#
|
2018-09-14 21:08:11 +02:00
|
|
|
FROM alpine:latest as builder
|
2016-09-12 20:26:36 +02:00
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
ca-certificates
|
|
|
|
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
2016-09-12 13:58:14 +02:00
|
|
|
|
2016-09-12 20:26:36 +02:00
|
|
|
RUN buildDeps=' \
|
|
|
|
go \
|
|
|
|
git \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
libc-dev \
|
|
|
|
libgcc \
|
|
|
|
' \
|
|
|
|
set -x \
|
|
|
|
&& apk --no-cache add $buildDeps \
|
|
|
|
&& go get github.com/mop-tracker/mop/cmd/mop \
|
|
|
|
&& echo "Build complete."
|
2016-09-12 13:58:14 +02:00
|
|
|
|
2018-09-14 21:08:11 +02:00
|
|
|
FROM alpine:latest
|
|
|
|
COPY --from=builder /go/bin/mop /usr/bin/mop
|
2016-09-12 20:26:36 +02:00
|
|
|
ENTRYPOINT [ "mop" ]
|