diff --git a/Dockerfile b/Dockerfile index 0ece191..58fb3b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,15 @@ -FROM golang - -WORKDIR /go/src/github.com/HarukaNetwork/HarukaX +FROM golang:1.14-alpine as build +LABEL maintainer="" +ENV GO111MODULE=on +WORKDIR /harukax COPY . . -ENTRYPOINT ["go", "run", "."] +RUN CGO_ENABLED=0 GOOS=linux go build -o /build/harukax + +FROM alpine:3.9 + +COPY --from=build /build/harukax /harukax +RUN touch .env # godotenv is weird and needs this + +ENTRYPOINT ["/harukax"]