Skip to content

Commit ddbc982

Browse files
authored
doc: update README (#61)
* doc: update README Signed-off-by: Jian Zeng <anonymousknight96@gmail.com> * chore: update Dockerfile-server Signed-off-by: Jian Zeng <anonymousknight96@gmail.com> --------- Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
1 parent 73e7769 commit ddbc982

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ kubectl relay -V
105105

106106
## Usage
107107

108+
> [!NOTE]
109+
> Starting from version v0.1.2, `krelay` attempts to tunnel SPDY through websocket, in line with how `kubectl port-forward` works.
110+
>
111+
> This behavior can be disabled by setting the environment variable `KUBECTL_PORT_FORWARD_WEBSOCKETS` to `false`.
112+
108113
```bash
109114
# Listen on port 8080 locally, forwarding data to the port named "http" in the service
110115
kubectl relay service/my-service 8080:http

manifests/Dockerfile-server

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
FROM golang:1.22.5 AS builder
22
WORKDIR /workspace
3-
ADD . .
4-
RUN CGO_ENABLED=0 go build -trimpath -ldflags '-w -s' -o krelay-server ./cmd/server
3+
RUN --mount=type=cache,target=/go/pkg/mod \
4+
--mount=type=cache,target=/root/.cache/go-build \
5+
--mount=target=. \
6+
CGO_ENABLED=0 go build -trimpath -ldflags '-w -s' -o /tmp/server ./cmd/server
57

68
FROM gcr.io/distroless/static:nonroot
79
LABEL maintainer="Jian Zeng <anonymousknight96@gmail.com>"
8-
COPY --from=builder /workspace/krelay-server /server
10+
COPY --from=builder /tmp/server /server
911
ENTRYPOINT ["/server"]

0 commit comments

Comments
 (0)