diff --git a/templates/go/.dockerignore b/templates/go/.dockerignore deleted file mode 100644 index 4023f209..00000000 --- a/templates/go/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -go diff --git a/templates/go/Dockerfile b/templates/go/Dockerfile deleted file mode 100644 index efb6ee7f..00000000 --- a/templates/go/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM golang:1.22-bookworm as builder - -WORKDIR /app - -COPY go.* ./ -RUN go mod download -COPY . ./ - -RUN CGO_ENABLED=0 go build -v -o server - -FROM alpine -COPY --from=builder /app/server /app/server - -CMD ["/app/server"] diff --git a/templates/go/README.md b/templates/go/README.md index 28f319aa..466cbfb1 100644 --- a/templates/go/README.md +++ b/templates/go/README.md @@ -4,3 +4,6 @@ Sample project configuration of a Restate service using the Go SDK. You can run locally with `go run .` and register to Restate with `restate dep add http://localhost:9080`. Then you can invoke with `curl localhost:8080/Greeter/Greet --json '"hello"'`. + +You can build a docker image using [ko](https://github.com/ko-build/ko): +`ko build --platform=all`