magnetico/Dockerfile.magneticow

36 lines
824 B
Docker
Raw Normal View History

2018-08-27 10:15:01 +02:00
# Start from a Debian image with the latest version of Go installed
# and a workspace (GOPATH) configured at /go.
2019-05-19 02:27:10 +02:00
FROM golang:1.12-alpine AS build
RUN export PATH=$PATH:/go/bin
RUN apk add --no-cache build-base curl git
2018-08-27 10:15:01 +02:00
# Copy the local package files to the container's workspace.
2019-05-19 02:27:10 +02:00
ADD ./Makefile /magnetico/
ADD ./pkg /magnetico/pkg
ADD ./go.mod /magnetico/go.mod
ADD ./cmd/magneticow /magnetico/cmd/magneticow
WORKDIR /magnetico
RUN go get -u github.com/kevinburke/go-bindata/...
RUN echo $PATH
RUN ls /go/bin
2018-08-27 10:15:01 +02:00
RUN make magneticow
FROM alpine:latest
2019-05-19 02:27:10 +02:00
LABEL maintainer="bora@boramalper.org"
WORKDIR /
COPY --from=build /go/bin/magneticow /magneticow
2019-05-19 02:27:10 +02:00
RUN adduser -D -S magnetico
USER magnetico
ENTRYPOINT ["/magneticow"]
2018-08-27 10:15:01 +02:00
# Document that the service listens on port 8080.
EXPOSE 8080