githubnemo / CompileDaemon

Very simple compile daemon for Go
BSD 2-Clause "Simplified" License
1.61k stars 153 forks source link

CompileDaemon not found #45

Closed dapobelieve closed 4 years ago

dapobelieve commented 4 years ago

I get the error "CompileDaemon: not found" and I don't understand why I'm getting such error

terev commented 4 years ago

@dapobelieve in what context? Is that an error from the binary or the os when trying to run it? Please paste the command you were trying to run

dapobelieve commented 4 years ago

From my docker container @terev

dapobelieve commented 4 years ago
Screenshot 2020-02-23 at 4 25 04 PM

This is my simple dockerfile and I still get CompileDaemon: not found when i run dockercompose

terev commented 4 years ago

@dapobelieve you specified the entrypoint as CompileDaemon which overrides the default entrypoint which is usually a shell with PATH set. if you changed your entrypoint to

ENTRYPOINT ["/go/bin/CompileDaemon", ...]

it should work. it would also work in the syntax you originally used as long as the full binary path is there

dapobelieve commented 4 years ago

Ok I'll try that

dapobelieve commented 4 years ago

Still doesn't work. How are other users able to use it? I just don't get it at all

terev commented 4 years ago

@dapobelieve go get installs into GOPATH . whatever GOPATH is in your base image is where it'll be installed. it could be a different dir than /go/bin

terev commented 4 years ago

@dapobelieve what base image are you using in your FROM ?

dapobelieve commented 4 years ago

Thanks @terev finally set it up properly had to do alot of reading

terev commented 4 years ago

@dapobelieve np . glad you got it working eventually

ghost commented 3 years ago

Gracias @terev finalmente lo configuró correctamente tuve que leer mucho

Y como lo resolviste? me está pasando lo mismo. Gracias

terev commented 3 years ago

@feuangel your entrypoint needs to reference the absolute path to the executable. Or if the base image you're building off of has a shell as the entrypoint and GOPATH/bin is in PATH you should be able to specify CMD ["CompileDaemon", ...] instead overriding the entrypoint

SanhDoan commented 3 years ago

hi @dapobelieve, I encounter the same issue, could you share your solution, thanks

githubnemo commented 3 years ago

@PhuSanh there is no general solution to this as it depends on your Dockerfile. Can you share it?

rituparnakhaund commented 2 years ago

@githubnemo how do I find what is the gopath for my base image?

WiRight commented 2 years ago

In my case I getting error on golang:1.18.2-alpine3.15 image

Downgrade to golang:1.16.0-alpine3.13 works for me

Try it

ostenbom commented 2 years ago

Rather than downgrading (we're on 1.18), switching the installation method to go install -mod=mod github.com/githubnemo/CompileDaemon worked for me!

Jatin-Kamboj commented 1 year ago

Rather than downgrading (we're on 1.18), switching the installation method to go install -mod=mod github.com/githubnemo/CompileDaemon worked for me!

This worked for me

sumonbiswas2010 commented 1 year ago

go install -mod=mod github.com/githubnemo/CompileDaemon

Worked for me also. Thanks man!

abdulla-bey01 commented 2 weeks ago

go install -mod=mod github.com/githubnemo/CompileDaemo

Worked. Thank you