Skip to content

Error building with Docker on Linux #424

@bryangruneberg

Description

@bryangruneberg

Describe the bug
When I run make build-docker-linux I get a vcs-stamping error. I might have the build environment setup incorrectly? On the chance its not just me... here are the details!

make build-docker-linux
docker run \
-v /home/bryan/Projects/lagoon/lagoon-cli/vendor:/go/pkg/mod \
-v /home/bryan/Projects/lagoon/lagoon-cli:/go/src/github.com/uselagoon/lagoon-cli/ \
-e GO111MODULE=on \
-e GOOS=linux \
-e GOARCH=amd64 \
-w="/go/src/github.com/uselagoon/lagoon-cli/" \
golang:1.23 go build -ldflags '-w -s -X github.com/uselagoon/lagoon-cli/cmd.lagoonCLIVersion=v0.31.4+447b638a -X github.com/uselagoon/lagoon-cli/cmd.lagoonCLIBuild=2025-02-07T16:26:43-0600 -X "github.com/uselagoon/lagoon-cli/cmd.lagoonCLIBuildGoVersion=go version go1.23.0 linux/amd64"' -o builds/lagoon-cli-v0.31.4+447b638a-linux-amd64
error obtaining VCS status: exit status 128
        Use -buildvcs=false to disable VCS stamping.
make: *** [Makefile:77: build-docker-linux] Error 1

To Reproduce
Steps to reproduce the behavior:

  1. git clone the lagoon-cli repo, and checkout main branch
  2. make build-docker-linux
  3. See: error obtaining VCS status: exit status 128
    Use -buildvcs=false to disable VCS stamping.

If I add the flag -buildvcs=false to the Makefile (see patch attached) I get a successful build using Docker

Makefile-patched.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions