diff --git a/Dockerfile b/Dockerfile index b777fdd..9b99222 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.20.0 as builder RUN apk update && apk add go RUN mkdir -p /opt/converge/bin -COPY . /opt/converge/ +COPY cmd pkg static go.mod go.sum /opt/converge/ WORKDIR /opt/converge RUN go mod download COPY . /opt/converge/ @@ -11,7 +11,7 @@ RUN go build -ldflags "-linkmode 'external' -extldflags '-static'" -o bin ./cmd/ FROM scratch COPY --from=builder /opt/converge/bin/converge /opt/converge/bin/ -COPY --from=builder /opt/converge/bin/agent /opt/converge/bin/tcptows /opt/converge/bin/convergeproxy /opt/converge/docs/ +COPY --from=builder /opt/converge/bin/agent /opt/converge/bin/tcptows /opt/converge/bin/wsproxy /opt/converge/docs/ COPY --from=builder /opt/converge/static/ /opt/converge/docs/ ENTRYPOINT ["/opt/converge/bin/converge", "/opt/converge/docs" ] diff --git a/cmd/convergeproxy/proxy.go b/cmd/wsproxy/proxy.go similarity index 100% rename from cmd/convergeproxy/proxy.go rename to cmd/wsproxy/proxy.go diff --git a/static/index.html b/static/index.html index 7c51013..b479d3a 100644 --- a/static/index.html +++ b/static/index.html @@ -22,16 +22,10 @@ In a continous integration job, download the agent, chmod it and run it.
- # for HTTP hosted server - curl http://HOSTPORT/docs/agent > agent - ./agent ws://HOST:PORT/agent/ID - chmod 755 agent - - # for HTTPS hosted server curl https://HOSTPORT/docs/agent > agent ./agent wss://HOST:PORT/agent/ID chmod 755 agent -+
Above, HOST:PORT is the hostname:port of the converge server and ID is a unique id for the job. This should not conflict with other ids. @@ -40,6 +34,29 @@ to establish a connection to the CI job through converge.
++ curl https://HOST:PORT/docs/wsproxy > wsproxy + chmod 755 wsproxy ++ +
This is a command that can be used as a proxy command for SSH which performs the connection to the remote + server.
+ ++ Next step is to run a local SSH of SFTP client: +
+ ++ ssh -oProxyCommand="wsproxy https://HOST:PORT/client/ID" -p 10000 abc@localhost + sftp -oProxyCommand="wsproxy https://HOST:PORT/client/ID" -oPort 10000 abc@localhost ++ +
+ abc
is a fixed user defined by converge. It has a very exciting password.
+
This runs a local client that allows SSH to port 10000 and connects to converge using @@ -89,7 +106,7 @@