From 1de2ef02ed889ca2e8e04de4e229bce82bfbc891 Mon Sep 17 00:00:00 2001 From: Jack Kleeman Date: Tue, 23 Jul 2024 13:00:39 +0100 Subject: [PATCH] Remove dockerfile --- templates/go/.dockerignore | 1 - templates/go/Dockerfile | 14 -------------- templates/go/README.md | 3 +++ 3 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 templates/go/.dockerignore delete mode 100644 templates/go/Dockerfile 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`