Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions documentation/content/en/book/05-developing-functions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,18 @@ standard input. You can now debug the KRM function in the VSCode debugger.

Build the image

The "get-started" package provides the `Dockerfile` that you can download using:
```shell
wget https://raw.githubusercontent.com/kptdev/krm-functions-sdk/main/go/kfn/commands/embed/Dockerfile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we even remove this file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The kfn tool is being removed from the project (issue #4731). That removal deletes go/kfn/commands/embed/Dockerfile, so the wget link this PR removes would otherwise become a dead link.

Create a `Dockerfile` in your function's directory:
```dockerfile
FROM golang:1.26-alpine3.23
ENV CGO_ENABLED=0
WORKDIR /go/src/
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o /usr/local/bin/function ./
FROM scratch
COPY --from=0 /usr/local/bin/function /usr/local/bin/function
ENTRYPOINT ["function"]
```

```shell
Expand Down