magnetico/Dockerfile.magneticod
2022-08-05 01:18:35 +02:00

23 lines
537 B
Docker

FROM golang:1.19-alpine AS build
WORKDIR /magnetico
RUN apk add --no-cache build-base curl git
ADD ./Makefile /magnetico/
ADD ./pkg /magnetico/pkg
ADD ./go.mod /magnetico/go.mod
ADD ./go.sum /magnetico/go.sum
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"]