Skip to content

Commit

Permalink
Fix error obtaining VCS status: exit status 128 at docker build
Browse files Browse the repository at this point in the history
How to replicate the error: `make docker`

Previous error:
```
... long log
 ---> f394d136bb6c
Step 7/24 : ADD proto/go.sum proto/go.sum
 ---> 7fca7e520cb3
Step 8/24 : ENV CGO_ENABLED 1
 ---> Running in ca87bf346155
Removing intermediate container ca87bf346155
 ---> af2dbef0c762
Step 9/24 : RUN go mod download
 ---> Running in 98785997fa9c
Removing intermediate container 98785997fa9c
 ---> f74577fb6d14
Step 10/24 : ADD . .
 ---> f1cc0ac767f0
Step 11/24 : RUN go build -tags sqlite -o /usr/bin/keto .
 ---> Running in 913258959d81
error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.
The command '/bin/sh -c go build -tags sqlite -o /usr/bin/keto .'
returned a non-zero code: 1
```

This is fixed by setting -buildvcs=false

ref: golang/go#49004
  • Loading branch information
ryukinix authored and zepatrik committed Aug 24, 2022
1 parent 81638c5 commit b7b4d07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .docker/Dockerfile-build
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN go mod download

ADD . .

RUN go build -tags sqlite -o /usr/bin/keto .
RUN go build -buildvcs=false -tags sqlite -o /usr/bin/keto .

FROM alpine:3.16

Expand Down

0 comments on commit b7b4d07

Please sign in to comment.