Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose up crashes on go get command #19

Open
fabulousduck opened this issue Nov 14, 2018 · 5 comments
Open

Docker compose up crashes on go get command #19

fabulousduck opened this issue Nov 14, 2018 · 5 comments

Comments

@fabulousduck
Copy link

when using the generated docker compose file by calling sudo docker-compose up. It fails with the following error:

ERROR: Service 'bugs' failed to build: The command '/bin/sh -c go get -t -v ./...' returned a non-zero code: 1

Looking at the logs it outputs, it seems like a lot of packages are not being installed.
Trying to execute go get -t -v ./... locally in the root folder of the project works just fine.

@tunght
Copy link

tunght commented Dec 4, 2018

I have this issue as well, anyone has solution yet?

Thanks

@gonzalobf
Copy link

Hi @fabulousduck @tunght ,

I had the same problem and I fixed it adding the workspace in the Dockerfile.
So for example if my Dockerfile was:

FROM golang

RUN mkdir -p /go/src/github.com/gonzalobf/go-kit-example

ADD . /go/src/github.com/gonzalobf/example

RUN go get  -t -v ./...
...

I added the workdir to the service, in this case custom-auth

FROM golang

RUN mkdir -p /go/src/github.com/gonzalobf/go-kit-example

WORKDIR /go/src/github.com/gonzalobf/go-kit-example/custom-auth

ADD . /go/src/github.com/gonzalobf/go-kit-example

RUN go get  -t -v ./...

Let me know if you have any further problem.

@ridwankustanto
Copy link

I think appdash "sourcegraph.com/sourcegraph/appdash" and opentracing "sourcegraph.com/github.com/sourcegraph/appdash/opentracing" are the problems, it can't be downloaded or something, the link is dead I guess.

@porika-v
Copy link

porika-v commented Jan 24, 2019

Is there any solution for this and how to stop go-kit files download always when i hit docker-compose up

@happilymarrieddad
Copy link

happilymarrieddad commented May 29, 2019

This probably has nothing to do with it but I increased the watchers on my machine and added the WORKDIR and after doing both it's working now... weird.. Just adding the WORKDIR by itself didn't solve it for me...

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants