magnetico/Dockerfile.magneticod
2019-09-18 01:21:50 +01:00

25 lines
672 B
Docker

# Start from a Debian image with the latest version of Go installed
# and a workspace (GOPATH) configured at /go.
FROM golang:1.13-alpine AS build
WORKDIR /magnetico
RUN apk add --no-cache build-base curl git
# Copy the local package files to the container's workspace.
ADD ./Makefile /magnetico/
ADD ./pkg /magnetico/pkg
ADD ./go.mod /magnetico/go.mod
ADD ./cmd/magneticod /magnetico/cmd/magneticod
RUN make magneticod
FROM alpine:latest
LABEL maintainer="bora@boramalper.org"
WORKDIR /
VOLUME /root/.local/share/magneticod
VOLUME /root/.config/magneticod
COPY --from=build /go/bin/magneticod /magneticod
ENTRYPOINT ["/magneticod"]