diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6f8a813 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +/build +/.idea \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a42c0e0..6c66197 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,10 @@ RUN go env -w CGO_ENABLED=0 WORKDIR /build +COPY go.mod go.sum ./ + +RUN go mod download + COPY . . RUN go build -ldflags '-extldflags "-static" -s -w' -o runner ./cmd/bitsrun