mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
32 lines
540 B
Docker
32 lines
540 B
Docker
# Run mop-tracker in a container
|
|
#
|
|
# docker run -it --rm \
|
|
# -v ~/.moprc:/root/.moprc \
|
|
# --name mop \
|
|
# r.j3ss.co/mop
|
|
#
|
|
FROM alpine:latest as builder
|
|
|
|
RUN apk --no-cache add \
|
|
ca-certificates
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
ENV GOPATH /go
|
|
|
|
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."
|
|
|
|
FROM alpine:latest
|
|
COPY --from=builder /go/bin/mop /usr/bin/mop
|
|
ENTRYPOINT [ "mop" ]
|