diff --git a/Dockerfile b/Dockerfile index e8453c6..40976cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,10 @@ FROM paulcager/go-base:latest as build -WORKDIR /go - -COPY go.mod *.go ./src/osgrid-server/ -RUN cd /go/src/osgrid-server && \ - go install -v ./... && \ +COPY * ./ +RUN CGO_ENABLED=0 go install -v ./... && \ sha256sum /go/bin/osgrid-server -FROM debian:stable-slim -RUN apt-get update && apt-get -y upgrade +FROM scratch WORKDIR /app COPY --from=build /go/bin/osgrid-server . EXPOSE 9090