From ddcc5ccbe178cb0dd3e07b57df0bd99ca90fd35d Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Mon, 31 Mar 2025 13:41:24 -0700 Subject: [PATCH] fix(docs): updates docs for shell --- README.md | 21 +-------------------- docs/.vitepress/config.ts | 1 + docs/guide/actions.md | 2 +- docs/guide/shell.md | 27 +++++++++++++++++++++++++++ docs/guide/supported-env-vars.md | 1 + 5 files changed, 31 insertions(+), 21 deletions(-) create mode 100644 docs/guide/shell.md diff --git a/README.md b/README.md index 006efdfe..e135b6b7 100644 --- a/README.md +++ b/README.md @@ -115,26 +115,7 @@ If you do not want to be tracked at all, see the `--no-analytics` flag below. ## Environment variables and configuration -Dozzle follows the [12-factor](https://12factor.net/) model. Configurations can use the CLI flags or environment variables. The table below outlines all supported options and their respective env vars. - -| Flag | Env Variable | Default | -| --------------------- | -------------------------- | -------------- | -| `--addr` | `DOZZLE_ADDR` | `:8080` | -| `--base` | `DOZZLE_BASE` | `/` | -| `--hostname` | `DOZZLE_HOSTNAME` | `""` | -| `--level` | `DOZZLE_LEVEL` | `info` | -| `--auth-provider` | `DOZZLE_AUTH_PROVIDER` | `none` | -| `--auth-header-user` | `DOZZLE_AUTH_HEADER_USER` | `Remote-User` | -| `--auth-header-email` | `DOZZLE_AUTH_HEADER_EMAIL` | `Remote-Email` | -| `--auth-header-name` | `DOZZLE_AUTH_HEADER_NAME` | `Remote-Name` | -| `--enable-actions` | `DOZZLE_ENABLE_ACTIONS` | `false` | -| `--filter` | `DOZZLE_FILTER` | `""` | -| `--no-analytics` | `DOZZLE_NO_ANALYTICS` | `false` | -| `--mode` | `DOZZLE_MODE` | `server` | -| `--remote-host` | `DOZZLE_REMOTE_HOST` | | -| `--remote-agent` | `DOZZLE_REMOTE_AGENT` | | -| `--timeout` | `DOZZLE_TIMEOUT` | `10s` | -| `--namespace` | `DOZZLE_NAMESPACE` | `""` | +Dozzle follows the [12-factor](https://12factor.net/) model. Configurations can use the CLI flags or environment variables. See documentation at [https://dozzle.dev/guide/supported-env-vars](https://dozzle.dev/guide/supported-env-vars) for more details. ## Support diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index c1f5297e..b0296e9a 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -72,6 +72,7 @@ export default defineConfig({ items: [ { text: "Authentication", link: "/guide/authentication" }, { text: "Actions", link: "/guide/actions" }, + { text: "Shell Access", link: "/guide/shell" }, { text: "Agent Mode", link: "/guide/agent" }, { text: "Changing Base", link: "/guide/changing-base" }, { text: "Container Names", link: "/guide/container-names" }, diff --git a/docs/guide/actions.md b/docs/guide/actions.md index 8299ae0c..a7f8f99d 100644 --- a/docs/guide/actions.md +++ b/docs/guide/actions.md @@ -4,7 +4,7 @@ title: Container Actions # Using Container Actions -Dozzle supports Container Actions, which allows you to `start`, `stop` and `restart` containers from within the UI in the dropdown menu. This feature is **disabled** by default and can be enabled by setting the environment variable `DOZZLE_ENABLE_ACTIONS` to `true`. +Dozzle supports container actions, which allows you to `start`, `stop` and `restart` containers from the dropdown menu on the right next to the container stats. This feature is **disabled** by default and can be enabled by setting the environment variable `DOZZLE_ENABLE_ACTIONS` to `true`. ::: code-group diff --git a/docs/guide/shell.md b/docs/guide/shell.md new file mode 100644 index 00000000..1072314e --- /dev/null +++ b/docs/guide/shell.md @@ -0,0 +1,27 @@ +--- +title: Container Shell Access +--- + +# Attaching and Executing Commands + +Dozzle supports attaching or executing commands within containers. It provides a web-based interface to interact with Docker containers, allowing users to attach to running containers and execute commands directly from the browser. This feature is particularly useful for debugging and troubleshooting containerized applications. This feature is **disabled** by default as it may pose security risks. To enable it, set the `DOZZLE_ENABLE_SHELL` environment variable to `true`. + +::: code-group + +```sh +docker run --volume=/var/run/docker.sock:/var/run/docker.sock -p 8080:8080 amir20/dozzle --enable-shell +``` + +```yaml [docker-compose.yml] +services: + dozzle: + image: amir20/dozzle:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock + ports: + - 8080:8080 + environment: + DOZZLE_ENABLE_SHELL: true +``` + +::: diff --git a/docs/guide/supported-env-vars.md b/docs/guide/supported-env-vars.md index 3ce3d289..69bba380 100644 --- a/docs/guide/supported-env-vars.md +++ b/docs/guide/supported-env-vars.md @@ -17,6 +17,7 @@ Configurations can be done with flags or environment variables. The table below | `--auth-header-email` | `DOZZLE_AUTH_HEADER_EMAIL` | `Remote-Email` | | `--auth-header-name` | `DOZZLE_AUTH_HEADER_NAME` | `Remote-Name` | | `--enable-actions` | `DOZZLE_ENABLE_ACTIONS` | `false` | +| `--enable-shell` | `DOZZLE_ENABLE_SHELL` | `false` | | `--filter` | `DOZZLE_FILTER` | `""` | | `--no-analytics` | `DOZZLE_NO_ANALYTICS` | `false` | | `--mode` | `DOZZLE_MODE` | `server` |