From 16ebe10ff201c086408a168bfcb0fd542152f8e3 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 9 Jun 2023 18:53:04 +0300 Subject: [PATCH] docs(admin/workspace-proxies): add instructions to run using the Docker image (#7915) * docs(admin/workspace-proxies): add instructions to run using the Docker image. * make fmt --- docs/admin/workspace-proxies.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/admin/workspace-proxies.md b/docs/admin/workspace-proxies.md index abed890597..3549320921 100644 --- a/docs/admin/workspace-proxies.md +++ b/docs/admin/workspace-proxies.md @@ -90,6 +90,32 @@ CODER_TLS_KEY_FILE="" coder wsproxy server ``` +### Running in Docker + +Modify the default entrypoint to run a workspace proxy server instead of a regular Coder server. + +#### Docker Compose + +Change the provided [`docker-compose.yml`](https://github.com/coder/coder/blob/main/docker-compose.yaml) file to include a custom entrypoint: + +```diff + image: ghcr.io/coder/coder:${CODER_VERSION:-latest} ++ entrypoint: /opt/coder wsproxy server +``` + +#### Docker run + +```bash +docker run --rm -it --entrypoint /opt/coder ghcr.io/coder/coder:latest wsproxy server +``` + +#### Custom Dockerfile + +```Dockerfile +FROM ghcr.io/coder/coder:latest +ENTRYPOINT ["/opt/coder", "wsproxy", "server"] +``` + ### Selecting a proxy Users can navigate to their account settings to select a workspace proxy. Workspace proxy preferences are cached by the web browser. If a proxy goes offline, the session will fall back to the primary proxy. This could take up to 60 seconds.