githubnemo / CompileDaemon

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

Docker + Go 1.18 = /bin/sh: CompileDaemon: not found #73

Closed hwebb closed 2 years ago

hwebb commented 2 years ago

It seems that it stopped working since the update of Go 1.18, the error is /bin/sh: CompileDaemon: not found It works when I get Go image 1.17.

Here is my Dockerfile:

FROM golang:alpine

WORKDIR /app

COPY ./ /app

RUN go mod download

RUN go get github.com/githubnemo/CompileDaemon

ENTRY

POINT CompileDaemon --build="go build -o /app/.bin/api-admin ./cmd/admin" --command=./.bin/api-admin

Thanks

demivi commented 2 years ago

Hi, This is because "go get" does not build and install packages anymore. Use go install <package>@<version> instead: RUN go install github.com/githubnemo/CompileDaemon@latest

Look for "go get" here https://tip.golang.org/doc/go1.18 and read https://go.dev/doc/go-get-install-deprecation for more details.

hwebb commented 2 years ago

That worked! Sorry I didn't read that deprecation. Thanks