Skip to content

Docker image build failed with 'error obtaining VCS status' #52

Description

@mardijker

Description

Using the provided Dockerfile to build image failed with the following error:

`ERROR [build_base 7/7] RUN go build -ldflags "-w -s" 7.1s

[build_base 7/7] RUN go build -ldflags "-w -s" -trimpath -o speedtest .:
#0 6.495 error obtaining VCS status: exit status 128
#0 6.495 Use -buildvcs=false to disable VCS stamping.


failed to solve: executor failed running [/bin/sh -c go build -ldflags "-w -s" -trimpath -o speedtest .]: exit code: 1`

Server

v1.1.5

Client

Can't be accessed since build fail

Steps to reproduce

  • Clone this repository and build image using provided Dockerfile without modification
  • Image building proceed until build_base 7/7
  • Failed with logs provided above

Expected behaviour

Successfully build the image

Temporary Fix

Using golang-1.17 instead of golang-1.18 worked

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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