Skip to content

Commit ecdaa3f

Browse files
Bot Updating Documentation
1 parent ef39ed4 commit ecdaa3f

File tree

1 file changed

+121
-31
lines changed

1 file changed

+121
-31
lines changed

docs/images/docker-kali-linux.md

Lines changed: 121 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -43,37 +43,118 @@ The application can be accessed at:
4343

4444
* https://yourhost:3001/
4545

46+
### Strict reverse proxies
47+
48+
This image uses a self-signed certificate by default. This naturally means the scheme is `https`.
49+
If you are using a reverse proxy which validates certificates, you need to [disable this check for the container](https://docs.linuxserver.io/faq#strict-proxy).
50+
51+
**Modern GUI desktop apps may have compatibility issues with the latest Docker syscall restrictions. You can use Docker with the `--security-opt seccomp=unconfined` setting to allow these syscalls on hosts with older Kernels or libseccomp versions.**
4652

4753
### Security
4854

49-
>[!WARNING]
50-
>Do not put this on the Internet if you do not know what you are doing.
55+
!!! warning
5156

52-
By default this container has no authentication and the optional environment variables `CUSTOM_USER` and `PASSWORD` to enable basic http auth via the embedded NGINX server should only be used to locally secure the container from unwanted access on a local network. If exposing this to the Internet we recommend putting it behind a reverse proxy, such as [SWAG](https://github.com/linuxserver/docker-swag), and ensuring a secure authentication solution is in place. From the web interface a terminal can be launched and it is configured for passwordless sudo, so anyone with access to it can install and run whatever they want along with probing your local network.
57+
This container provides privileged access to the host system. Do not expose it to the Internet unless you have secured it properly.
5358

54-
### Nvidia GPU Support
59+
**HTTPS is required for full functionality.** Modern browser features such as WebCodecs, used for video and audio, will not function over an insecure HTTP connection.
5560

56-
**Nvidia support is not compatible with Alpine based images as Alpine lacks Nvidia drivers**
61+
By default, this container has no authentication. The optional `CUSTOM_USER` and `PASSWORD` environment variables enable basic HTTP auth, which is suitable only for securing the container on a trusted local network. For internet exposure, we strongly recommend placing the container behind a reverse proxy, such as [SWAG](https://github.com/linuxserver/docker-swag), with a robust authentication mechanism.
5762

58-
Nvidia support is available by leveraging Zink for OpenGL support. This can be enabled with the following run flags:
63+
The web interface includes a terminal with passwordless `sudo` access. Any user with access to the GUI can gain root control within the container, install arbitrary software, and probe your local network.
64+
65+
While not generally recommended, certain legacy environments specifically those with older hardware or outdated Linux distributions may require the deactivation of the standard seccomp profile to get containerized desktop software to run. This can be achieved by utilizing the `--security-opt seccomp=unconfined` parameter. It is critical to use this option only when absolutely necessary as it disables a key security layer of Docker, elevating the potential for container escape vulnerabilities.
66+
67+
### Options in all Selkies-based GUI containers
68+
69+
This container is based on [Docker Baseimage Selkies](https://github.com/linuxserver/docker-baseimage-selkies), which provides the following environment variables and run configurations to customize its functionality.
70+
71+
#### Optional Environment Variables
5972

6073
| Variable | Description |
6174
| :----: | --- |
62-
| --gpus all | This can be filtered down but for most setups this will pass the one Nvidia GPU on the system |
63-
| --runtime nvidia | Specify the Nvidia runtime which mounts drivers and tools in from the host |
75+
| `CUSTOM_PORT` | Internal HTTP port. Defaults to `3000`. |
76+
| `CUSTOM_HTTPS_PORT` | Internal HTTPS port. Defaults to `3001`. |
77+
| `CUSTOM_WS_PORT` | Internal port the container listens on for websockets if it needs to be swapped from the default 8082. |
78+
| `CUSTOM_USER` | Username for HTTP Basic Auth. Defaults to `abc`. |
79+
| `PASSWORD` | Password for HTTP Basic Auth. If unset, authentication is disabled. |
80+
| `SUBFOLDER` | Application subfolder for reverse proxy configurations. Must include leading and trailing slashes, e.g., `/subfolder/`. |
81+
| `TITLE` | Page title displayed in the web browser. Defaults to "Selkies". |
82+
| `START_DOCKER` | If set to `false`, the privileged Docker-in-Docker setup will not start automatically. |
83+
| `DISABLE_IPV6` | Set to `true` to disable IPv6 support in the container. |
84+
| `LC_ALL` | Sets the container's locale, e.g., `fr_FR.UTF-8`. |
85+
| `DRINODE` | If mounting in /dev/dri for DRI3 GPU Acceleration allows you to specify the device to use IE `/dev/dri/renderD128` |
86+
| `NO_DECOR` | If set, applications will run without window borders, suitable for PWA usage. |
87+
| `NO_FULL` | If set, applications will not be automatically fullscreened. |
88+
| `DISABLE_ZINK` | If set, Zink-related environment variables will not be configured when a video card is detected. |
89+
| `WATERMARK_PNG` | Full path to a watermark PNG file inside the container, e.g., `/usr/share/selkies/www/icon.png`. |
90+
| `WATERMARK_LOCATION` | Integer specifying the watermark location: `1` (Top Left), `2` (Top Right), `3` (Bottom Left), `4` (Bottom Right), `5` (Centered), `6` (Animated). |
91+
92+
#### Optional Run Configurations
93+
94+
| Argument | Description |
95+
| :----: | --- |
96+
| `--privileged` | Starts a Docker-in-Docker (DinD) environment. For better performance, mount the Docker data directory from the host, e.g., `-v /path/to/docker-data:/var/lib/docker`. |
97+
| `-v /var/run/docker.sock:/var/run/docker.sock` | Mounts the host's Docker socket to manage host containers from within this container. |
98+
| `--device /dev/dri:/dev/dri` | Mount a GPU into the container, this can be used in conjunction with the `DRINODE` environment variable to leverage a host video card for GPU accelerated applications. Only **Open Source** drivers are supported IE (Intel,AMDGPU,Radeon,ATI,Nouveau) |
99+
100+
### Language Support - Internationalization
64101

65-
The compose syntax is slightly different for this as you will need to set nvidia as the default runtime:
102+
To launch the desktop session in a different language, set the `LC_ALL` environment variable. For example:
103+
104+
* `-e LC_ALL=zh_CN.UTF-8` - Chinese
105+
* `-e LC_ALL=ja_JP.UTF-8` - Japanese
106+
* `-e LC_ALL=ko_KR.UTF-8` - Korean
107+
* `-e LC_ALL=ar_AE.UTF-8` - Arabic
108+
* `-e LC_ALL=ru_RU.UTF-8` - Russian
109+
* `-e LC_ALL=es_MX.UTF-8` - Spanish (Latin America)
110+
* `-e LC_ALL=de_DE.UTF-8` - German
111+
* `-e LC_ALL=fr_FR.UTF-8` - French
112+
* `-e LC_ALL=nl_NL.UTF-8` - Netherlands
113+
* `-e LC_ALL=it_IT.UTF-8` - Italian
114+
115+
### DRI3 GPU Acceleration
116+
117+
For accelerated apps or games, render devices can be mounted into the container and leveraged by applications using:
118+
119+
`--device /dev/dri:/dev/dri`
120+
121+
This feature only supports **Open Source** GPU drivers:
122+
123+
| Driver | Description |
124+
| :----: | --- |
125+
| Intel | i965 and i915 drivers for Intel iGPU chipsets |
126+
| AMD | AMDGPU, Radeon, and ATI drivers for AMD dedicated or APU chipsets |
127+
| NVIDIA | nouveau2 drivers only, closed source NVIDIA drivers lack DRI3 support |
128+
129+
The `DRINODE` environment variable can be used to point to a specific GPU.
130+
131+
DRI3 will work on aarch64 given the correct drivers are installed inside the container for your chipset.
132+
133+
### Nvidia GPU Support
134+
135+
**Note: Nvidia support is not available for Alpine-based images.**
136+
137+
Nvidia GPU support is available by leveraging Zink for OpenGL. When a compatible Nvidia GPU is passed through, it will also be **automatically utilized for hardware-accelerated video stream encoding** (using the `x264enc` full-frame profile), significantly reducing CPU load.
138+
139+
Enable Nvidia support with the following runtime flags:
140+
141+
| Flag | Description |
142+
| :----: | --- |
143+
| `--gpus all` | Passes all available host GPUs to the container. This can be filtered to specific GPUs. |
144+
| `--runtime nvidia` | Specifies the Nvidia runtime, which provides the necessary drivers and tools from the host. |
145+
146+
For Docker Compose, you must first configure the Nvidia runtime as the default on the host:
66147

67148
```
68149
sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
69-
sudo service docker restart
150+
sudo systemctl restart docker
70151
```
71152

72-
And to assign the GPU in compose:
153+
Then, assign the GPU to the service in your `compose.yaml`:
73154

74155
```
75156
services:
76-
kalilinux:
157+
kali-linux:
77158
image: lscr.io/linuxserver/kali-linux:latest
78159
deploy:
79160
resources:
@@ -84,10 +165,32 @@ services:
84165
capabilities: [compute,video,graphics,utility]
85166
```
86167

87-
### Strict reverse proxies
168+
### Application Management
88169

89-
This image uses a self-signed certificate by default. This naturally means the scheme is `https`.
90-
If you are using a reverse proxy which validates certificates, you need to [disable this check for the container](https://docs.linuxserver.io/faq#strict-proxy).
170+
There are two methods for installing applications inside the container: PRoot Apps (recommended for persistence) and Native Apps.
171+
172+
#### PRoot Apps (Persistent)
173+
174+
Natively installed packages (e.g., via `apt-get install`) will not persist if the container is recreated. To retain applications and their settings across container updates, we recommend using [proot-apps](https://github.com/linuxserver/proot-apps). These are portable applications installed to the user's persistent `$HOME` directory.
175+
176+
To install an application, use the command line inside the container:
177+
178+
```
179+
proot-apps install filezilla
180+
```
181+
182+
A list of supported applications is available [here](https://github.com/linuxserver/proot-apps?tab=readme-ov-file#supported-apps).
183+
184+
#### Native Apps (Non-Persistent)
185+
186+
You can install packages from the system's native repository using the [universal-package-install](https://github.com/linuxserver/docker-mods/tree/universal-package-install) mod. This method will increase the container's start time and is not persistent. Add the following to your `compose.yaml`:
187+
188+
```yaml
189+
environment:
190+
- DOCKER_MODS=linuxserver/mods:universal-package-install
191+
- INSTALL_PACKAGES=libfuse2|git|gdb
192+
```
193+
91194
92195
## Usage
93196
@@ -105,21 +208,16 @@ services:
105208
kali-linux:
106209
image: lscr.io/linuxserver/kali-linux:latest
107210
container_name: kali-linux
108-
security_opt:
109-
- seccomp:unconfined #optional
110211
environment:
111212
- PUID=1000
112213
- PGID=1000
113214
- TZ=Etc/UTC
114-
- SUBFOLDER=/ #optional
115-
- "TITLE=Kali Linux" #optional
116215
volumes:
117216
- /path/to/data:/config
118-
- /var/run/docker.sock:/var/run/docker.sock #optional
119217
ports:
120218
- 3000:3000
121219
- 3001:3001
122-
shm_size: "1gb" #optional
220+
shm_size: "1gb"
123221
restart: unless-stopped
124222
```
125223
@@ -128,17 +226,13 @@ services:
128226
```bash
129227
docker run -d \
130228
--name=kali-linux \
131-
--security-opt seccomp=unconfined `#optional` \
132229
-e PUID=1000 \
133230
-e PGID=1000 \
134231
-e TZ=Etc/UTC \
135-
-e SUBFOLDER=/ `#optional` \
136-
-e TITLE="Kali Linux" `#optional` \
137232
-p 3000:3000 \
138233
-p 3001:3001 \
139234
-v /path/to/data:/config \
140-
-v /var/run/docker.sock:/var/run/docker.sock `#optional` \
141-
--shm-size="1gb" `#optional` \
235+
--shm-size="1gb" \
142236
--restart unless-stopped \
143237
lscr.io/linuxserver/kali-linux:latest
144238
```
@@ -161,22 +255,18 @@ Containers are configured using parameters passed at runtime (such as those abov
161255
| `PUID=1000` | for UserID - see below for explanation |
162256
| `PGID=1000` | for GroupID - see below for explanation |
163257
| `TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
164-
| `SUBFOLDER=/` | Specify a subfolder to use with reverse proxies, IE `/subfolder/` |
165-
| `TITLE=Kali Linux` | String which will be used as page/tab title in the web browser. |
166258

167259
### Volume Mappings (`-v`)
168260

169261
| Volume | Function |
170262
| :----: | --- |
171263
| `/config` | abc users home directory |
172-
| `/var/run/docker.sock` | Docker Socket on the system, if you want to use Docker in the container |
173264

174265
#### Miscellaneous Options
175266

176267
| Parameter | Function |
177268
| :-----: | --- |
178-
| `--shm-size=` | We set this to 1 gig to prevent modern web browsers from crashing |
179-
| `--security-opt seccomp=unconfined` | For Docker Engine only, many modern gui apps need this to function on older hosts as syscalls are unknown to Docker. |
269+
| `--shm-size=` | Recommended for all desktop images. |
180270

181271
## Environment variables from files (Docker secrets)
182272

0 commit comments

Comments
 (0)