Skip to content

Commit 71ce341

Browse files
Nino-KCopilot
andcommitted
Move networking and guestagent sources into repo
Copy src/go/guestagent and src/go/networking from rancher-desktop into the opensuse repo. Add a replace directive in networking/go.mod pointing to the local guestagent. Update Dockerfile to build all binaries from local sources, removing both git clone calls. Sourced from: https://github.com/rancher-sandbox/rancher-desktop At commit: c8cd431 Signed-off-by: Nino Kodabande <nkodabande@suse.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 parents 144637b + c8cd431 commit 71ce341

48 files changed

Lines changed: 7212 additions & 12 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
# syntax=docker/dockerfile:1-labs
22

33
FROM registry.opensuse.org/opensuse/bci/golang:stable AS gobuild
4-
RUN git clone https://github.com/rancher-sandbox/rancher-desktop --depth=1 /app
5-
WORKDIR /app
6-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \
7-
go build -ldflags '-s -w' -o /go/bin/network-setup ./src/go/networking/cmd/network
4+
COPY src /rd
5+
6+
WORKDIR /rd/go/guestagent
87
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \
9-
go build -ldflags '-s -w' -o /go/bin/vm-switch ./src/go/networking/cmd/vm
8+
go build -ldflags '-s -w' -o /go/bin/rancher-desktop-guest-agent .
9+
10+
WORKDIR /rd/go/networking
1011
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \
11-
go build -ldflags '-s -w' -o /go/bin/wsl-proxy ./src/go/networking/cmd/proxy
12+
go build -ldflags '-s -w' -o /go/bin/network-setup ./cmd/network
1213
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \
13-
go build -ldflags '-s -w' -o /go/bin/rancher-desktop-guest-agent ./src/go/guestagent
14-
15-
RUN git clone https://github.com/rancher-sandbox/rancher-desktop-daemon --depth=1 /daemon
16-
WORKDIR /daemon
14+
go build -ldflags '-s -w' -o /go/bin/vm-switch ./cmd/vm
1715
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \
18-
CGO_ENABLED=0 go build -ldflags '-s -w' -o /go/bin/rdd-guest ./cmd/rdd-guest
16+
go build -ldflags '-s -w' -o /go/bin/wsl-proxy ./cmd/proxy
1917

20-
COPY src /rd
2118
WORKDIR /rd/rd-init
2219
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \
2320
go build -ldflags '-s -w' -o /go/bin/rd-init .
2421

22+
WORKDIR /rd/rdd-guest
23+
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod \
24+
CGO_ENABLED=0 go build -ldflags '-s -w' -o /go/bin/rdd-guest .
25+
2526
FROM registry.opensuse.org/opensuse/bci/kiwi:10 AS builder
2627
ARG type=qcow2.xz
2728
ARG NERDCTL_VERSION

src/go/guestagent/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[Rancher Desktop Guest Agent](/docs/networking/windows/rancher-desktop-guest-agent.md)

src/go/guestagent/go.mod

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
module github.com/rancher-sandbox/rancher-desktop/src/go/guestagent
2+
3+
go 1.26.0
4+
5+
require (
6+
github.com/Masterminds/log-go v1.0.0
7+
github.com/containerd/containerd v1.7.31
8+
github.com/containerd/containerd/api v1.10.0
9+
github.com/containernetworking/plugins v1.9.1
10+
github.com/containers/gvisor-tap-vsock v0.8.8
11+
github.com/docker/docker v28.5.2+incompatible
12+
github.com/docker/go-connections v0.7.0
13+
github.com/lima-vm/lima v1.0.0-beta.0
14+
github.com/stretchr/testify v1.11.1
15+
golang.org/x/sync v0.20.0
16+
golang.org/x/sys v0.43.0
17+
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
18+
k8s.io/api v0.36.0
19+
k8s.io/apimachinery v0.36.0
20+
k8s.io/client-go v0.36.0
21+
)
22+
23+
require (
24+
cyphar.com/go-pathrs v0.2.1 // indirect
25+
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
26+
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
27+
github.com/Microsoft/go-winio v0.6.2 // indirect
28+
github.com/Microsoft/hcsshim v0.13.0 // indirect
29+
github.com/containerd/cgroups/v3 v3.0.3 // indirect
30+
github.com/containerd/continuity v0.4.5 // indirect
31+
github.com/containerd/errdefs v0.3.0 // indirect
32+
github.com/containerd/errdefs/pkg v0.3.0 // indirect
33+
github.com/containerd/fifo v1.1.0 // indirect
34+
github.com/containerd/log v0.1.0 // indirect
35+
github.com/containerd/platforms v0.2.1 // indirect
36+
github.com/containerd/ttrpc v1.2.7 // indirect
37+
github.com/containerd/typeurl/v2 v2.2.0 // indirect
38+
github.com/coreos/go-iptables v0.8.0 // indirect
39+
github.com/cyphar/filepath-securejoin v0.6.0 // indirect
40+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
41+
github.com/distribution/reference v0.6.0 // indirect
42+
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
43+
github.com/docker/go-units v0.5.0 // indirect
44+
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
45+
github.com/felixge/httpsnoop v1.0.4 // indirect
46+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
47+
github.com/go-logr/logr v1.4.3 // indirect
48+
github.com/go-logr/stdr v1.2.2 // indirect
49+
github.com/go-openapi/jsonpointer v0.22.1 // indirect
50+
github.com/go-openapi/jsonreference v0.21.3 // indirect
51+
github.com/go-openapi/swag v0.23.1 // indirect
52+
github.com/go-openapi/swag/jsonname v0.25.1 // indirect
53+
github.com/gogo/protobuf v1.3.2 // indirect
54+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
55+
github.com/google/gnostic-models v0.7.0 // indirect
56+
github.com/google/go-cmp v0.7.0 // indirect
57+
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
58+
github.com/google/uuid v1.6.0 // indirect
59+
github.com/josharian/intern v1.0.0 // indirect
60+
github.com/json-iterator/go v1.1.12 // indirect
61+
github.com/klauspost/compress v1.17.9 // indirect
62+
github.com/mailru/easyjson v0.9.0 // indirect
63+
github.com/moby/docker-image-spec v1.3.1 // indirect
64+
github.com/moby/locker v1.0.1 // indirect
65+
github.com/moby/sys/atomicwriter v0.1.0 // indirect
66+
github.com/moby/sys/mountinfo v0.7.1 // indirect
67+
github.com/moby/sys/sequential v0.6.0 // indirect
68+
github.com/moby/sys/signal v0.7.0 // indirect
69+
github.com/moby/sys/user v0.3.0 // indirect
70+
github.com/moby/sys/userns v0.1.0 // indirect
71+
github.com/moby/term v0.5.0 // indirect
72+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
73+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
74+
github.com/morikuni/aec v1.0.0 // indirect
75+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
76+
github.com/onsi/ginkgo/v2 v2.28.0 // indirect
77+
github.com/opencontainers/go-digest v1.0.0 // indirect
78+
github.com/opencontainers/image-spec v1.1.1 // indirect
79+
github.com/opencontainers/runtime-spec v1.2.0 // indirect
80+
github.com/opencontainers/selinux v1.13.1 // indirect
81+
github.com/pkg/errors v0.9.1 // indirect
82+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
83+
github.com/sirupsen/logrus v1.9.4 // indirect
84+
github.com/spf13/pflag v1.0.10 // indirect
85+
github.com/vishvananda/netlink v1.3.1 // indirect
86+
github.com/vishvananda/netns v0.0.5 // indirect
87+
github.com/x448/float16 v0.8.4 // indirect
88+
go.opencensus.io v0.24.0 // indirect
89+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
90+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
91+
go.opentelemetry.io/otel v1.37.0 // indirect
92+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
93+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
94+
go.yaml.in/yaml/v2 v2.4.3 // indirect
95+
go.yaml.in/yaml/v3 v3.0.4 // indirect
96+
golang.org/x/mod v0.35.0 // indirect
97+
golang.org/x/net v0.53.0 // indirect
98+
golang.org/x/oauth2 v0.34.0 // indirect
99+
golang.org/x/term v0.42.0 // indirect
100+
golang.org/x/text v0.36.0 // indirect
101+
golang.org/x/time v0.14.0 // indirect
102+
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
103+
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
104+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 // indirect
105+
google.golang.org/grpc v1.69.2 // indirect
106+
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
107+
gopkg.in/inf.v0 v0.9.1 // indirect
108+
gopkg.in/yaml.v3 v3.0.1 // indirect
109+
gotest.tools/v3 v3.5.2 // indirect
110+
k8s.io/klog/v2 v2.140.0 // indirect
111+
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect
112+
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
113+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
114+
sigs.k8s.io/knftables v0.0.18 // indirect
115+
sigs.k8s.io/randfill v1.0.0 // indirect
116+
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
117+
sigs.k8s.io/yaml v1.6.0 // indirect
118+
)
119+
120+
replace github.com/lima-vm/lima => github.com/rancher-sandbox/lima v1.0.3-0.20250115235144-24eb898b3a96

0 commit comments

Comments
 (0)