hello Umesh, I got error when I run the container. with :
docker run -p 8000:8000 hello_world:1.0
the error is: /bin/sh: CompileDaemon: not found
Im not sure, why this error appear. please help, thank you.
With newer versions of Go go get is used to adjust dependencies. To install packages, CompileDaemon in this case, go install is used, so you'll need to change in your Dockerfile line RUN go get github.com/githubnemo/CompileDaemon
to RUN go install github.com/githubnemo/CompileDaemon
and it should work as it should
The same happened here and I fixed using this line in my Dockerfile:
instead of RUN go get github.com/githubnemo/CompileDaemon
Use RUN go install -mod=mod github.com/githubnemo/CompileDaemon
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
hello Umesh, I got error when I run the container. with :
docker run -p 8000:8000 hello_world:1.0
the error is: /bin/sh: CompileDaemon: not found
Im not sure, why this error appear. please help, thank you.
With newer versions of Go
go get
is used to adjust dependencies. To install packages, CompileDaemon in this case,go install
is used, so you'll need to change in your Dockerfile lineRUN go get github.com/githubnemo/CompileDaemon
to
RUN go install github.com/githubnemo/CompileDaemon
and it should work as it should
I use Go v.1.19 and I need two lines above to install
CompileDaemon
. Having just one of them is not enough.RUN go get github.com/githubnemo/CompileDaemon
RUN go install github.com/githubnemo/CompileDaemon
The same happened here and I fixed using this line in my Dockerfile:
instead of
RUN go get github.com/githubnemo/CompileDaemon
Use
RUN go install -mod=mod github.com/githubnemo/CompileDaemon