forked from boramalper/magnetico
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.magneticow
30 lines (23 loc) · 933 Bytes
/
Dockerfile.magneticow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 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 export PATH=$PATH:/go/bin
RUN apk add --no-cache build-base curl git
RUN go get -u github.com/kevinburke/go-bindata/...
# 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/magneticow /magnetico/cmd/magneticow
RUN make magneticow
FROM alpine:latest
LABEL maintainer="[email protected]"
# the service listens on port 8080
EXPOSE 8080
WORKDIR /
VOLUME /root/.local/share/magneticod
RUN mkdir -p "/root/.config/magneticow/"
RUN echo 'magnetico:$2y$06$8VzJvXegA2X/tfmTXN7NM.FH5HRh8fbvXUmrtW52xLH5JNDhldexG' > "/root/.config/magneticow/credentials"
COPY --from=build /go/bin/magneticow /magneticow
ENTRYPOINT ["/magneticow"]