I modified the runfatal method and got the cmd error output
func runFatal(cmd *exec.Cmd) {
var stderr bytes.Buffer
cmd.Stderr = &stderr
if err := cmd.Run(); err != nil {
log.Fatalf("While running command: %q Error: %v\n",
strings.Join(cmd.Args, " "), stderr.String())
}
}
17:44:43
ERROR: for test-tc-709-4_alpha3_1 Cannot start service alpha3: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/gobin/dgraph\": stat /gobin/dgraph: no such file or directory": unknown
17:44:43
[1A [2K
17:44:43
Creating test-tc-709-4_alpha2_1 ... error
17:44:43
[1B
17:44:43
ERROR: for test-tc-709-4_alpha2_1 Cannot start service alpha2: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/gobin/dgraph\": stat /gobin/dgraph: no such file or directory": unknown
17:44:43
[3A [2K
17:44:43
Creating test-tc-709-4_alpha1_1 ... error
17:44:43
[3B
17:44:43
ERROR: for test-tc-709-4_alpha1_1 Cannot start service alpha1: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/gobin/dgraph\": stat /gobin/dgraph: no such file or directory": unknown
17:44:43
[2A [2K
17:44:43
Creating test-tc-709-4_zero1_1 ... error
Then I found that the $GOPATH environment variable was not fetched in teamcity, so the dgraph binary not being in the data volume.
Because the data volume configuration in docker compose is like this
volumes:
- type: bind
source: $GOPATH/bin
target: /gobin
read_only: true