Commit 00ed2b0e authored by Mike Jones's avatar Mike Jones 🌶

Add Dockerfile

parent d796ee3b
FROM golang:1.11.1-alpine3.7 as builder
LABEL maintainer="Mike Jones"
RUN mkdir -p /go/src/git.netsplit.uk/stella-irc/modlastfm
COPY . /go/src/git.netsplit.uk/stella-irc/modlastfm
RUN apk update && apk upgrade && \
apk add --no-cache git gcc musl-dev
WORKDIR /go/src/git.netsplit.uk/stella-irc/modlastfm
RUN go get ./... && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -o /opt/modlastfm cmd/modlastfm/main.go && \
apk del --purge git gcc musl-dev && \
rm -rf /go/bin /go/pkg /var/cache/apk/*
RUN chmod +x /opt/modlastfm
FROM scratch
COPY --from=builder /opt /opt
ENTRYPOINT ["/opt/modlastfm"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment