Skip to content

Commit f4ccc89

Browse files
committed
syntax and readme updates
1 parent 9a55850 commit f4ccc89

4 files changed

Lines changed: 129 additions & 89 deletions

File tree

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# syntax=docker/dockerfile:1
2+
13
FROM ghcr.io/linuxserver/baseimage-selkies:kali
24

35
# set version label
@@ -66,5 +68,5 @@ RUN \
6668
COPY /root /
6769

6870
# ports and volumes
69-
EXPOSE 3000
71+
EXPOSE 3001
7072
VOLUME /config

Dockerfile.aarch64

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# syntax=docker/dockerfile:1
2+
13
FROM ghcr.io/linuxserver/baseimage-selkies:arm64v8-kali
24

35
# set version label
@@ -66,5 +68,5 @@ RUN \
6668
COPY /root /
6769

6870
# ports and volumes
69-
EXPOSE 3000
71+
EXPOSE 3001
7072
VOLUME /config

README.md

Lines changed: 118 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -60,37 +60,117 @@ The application can be accessed at:
6060

6161
* https://yourhost:3001/
6262

63+
### Strict reverse proxies
64+
65+
This image uses a self-signed certificate by default. This naturally means the scheme is `https`.
66+
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).
67+
68+
**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.**
6369

6470
### Security
6571

6672
>[!WARNING]
67-
>Do not put this on the Internet if you do not know what you are doing.
73+
>This container provides privileged access to the host system. Do not expose it to the Internet unless you have secured it properly.
6874
69-
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.
75+
**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.
7076

71-
### Nvidia GPU Support
77+
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.
7278

73-
**Nvidia support is not compatible with Alpine based images as Alpine lacks Nvidia drivers**
79+
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.
7480

75-
Nvidia support is available by leveraging Zink for OpenGL support. This can be enabled with the following run flags:
81+
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.
82+
83+
### Options in all Selkies-based GUI containers
84+
85+
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.
86+
87+
#### Optional Environment Variables
7688

7789
| Variable | Description |
7890
| :----: | --- |
79-
| --gpus all | This can be filtered down but for most setups this will pass the one Nvidia GPU on the system |
80-
| --runtime nvidia | Specify the Nvidia runtime which mounts drivers and tools in from the host |
91+
| `CUSTOM_PORT` | Internal HTTP port. Defaults to `3000`. |
92+
| `CUSTOM_HTTPS_PORT` | Internal HTTPS port. Defaults to `3001`. |
93+
| `CUSTOM_WS_PORT` | Internal port the container listens on for websockets if it needs to be swapped from the default 8082. |
94+
| `CUSTOM_USER` | Username for HTTP Basic Auth. Defaults to `abc`. |
95+
| `PASSWORD` | Password for HTTP Basic Auth. If unset, authentication is disabled. |
96+
| `SUBFOLDER` | Application subfolder for reverse proxy configurations. Must include leading and trailing slashes, e.g., `/subfolder/`. |
97+
| `TITLE` | Page title displayed in the web browser. Defaults to "Selkies". |
98+
| `START_DOCKER` | If set to `false`, the privileged Docker-in-Docker setup will not start automatically. |
99+
| `DISABLE_IPV6` | Set to `true` to disable IPv6 support in the container. |
100+
| `LC_ALL` | Sets the container's locale, e.g., `fr_FR.UTF-8`. |
101+
| `DRINODE` | If mounting in /dev/dri for DRI3 GPU Acceleration allows you to specify the device to use IE `/dev/dri/renderD128` |
102+
| `NO_DECOR` | If set, applications will run without window borders, suitable for PWA usage. |
103+
| `NO_FULL` | If set, applications will not be automatically fullscreened. |
104+
| `DISABLE_ZINK` | If set, Zink-related environment variables will not be configured when a video card is detected. |
105+
| `WATERMARK_PNG` | Full path to a watermark PNG file inside the container, e.g., `/usr/share/selkies/www/icon.png`. |
106+
| `WATERMARK_LOCATION` | Integer specifying the watermark location: `1` (Top Left), `2` (Top Right), `3` (Bottom Left), `4` (Bottom Right), `5` (Centered), `6` (Animated). |
107+
108+
#### Optional Run Configurations
109+
110+
| Argument | Description |
111+
| :----: | --- |
112+
| `--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`. |
113+
| `-v /var/run/docker.sock:/var/run/docker.sock` | Mounts the host's Docker socket to manage host containers from within this container. |
114+
| `--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) |
115+
116+
### Language Support - Internationalization
117+
118+
To launch the desktop session in a different language, set the `LC_ALL` environment variable. For example:
119+
120+
* `-e LC_ALL=zh_CN.UTF-8` - Chinese
121+
* `-e LC_ALL=ja_JP.UTF-8` - Japanese
122+
* `-e LC_ALL=ko_KR.UTF-8` - Korean
123+
* `-e LC_ALL=ar_AE.UTF-8` - Arabic
124+
* `-e LC_ALL=ru_RU.UTF-8` - Russian
125+
* `-e LC_ALL=es_MX.UTF-8` - Spanish (Latin America)
126+
* `-e LC_ALL=de_DE.UTF-8` - German
127+
* `-e LC_ALL=fr_FR.UTF-8` - French
128+
* `-e LC_ALL=nl_NL.UTF-8` - Netherlands
129+
* `-e LC_ALL=it_IT.UTF-8` - Italian
130+
131+
### DRI3 GPU Acceleration
132+
133+
For accelerated apps or games, render devices can be mounted into the container and leveraged by applications using:
134+
135+
`--device /dev/dri:/dev/dri`
136+
137+
This feature only supports **Open Source** GPU drivers:
138+
139+
| Driver | Description |
140+
| :----: | --- |
141+
| Intel | i965 and i915 drivers for Intel iGPU chipsets |
142+
| AMD | AMDGPU, Radeon, and ATI drivers for AMD dedicated or APU chipsets |
143+
| NVIDIA | nouveau2 drivers only, closed source NVIDIA drivers lack DRI3 support |
144+
145+
The `DRINODE` environment variable can be used to point to a specific GPU.
146+
147+
DRI3 will work on aarch64 given the correct drivers are installed inside the container for your chipset.
148+
149+
### Nvidia GPU Support
150+
151+
**Note: Nvidia support is not available for Alpine-based images.**
152+
153+
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.
154+
155+
Enable Nvidia support with the following runtime flags:
156+
157+
| Flag | Description |
158+
| :----: | --- |
159+
| `--gpus all` | Passes all available host GPUs to the container. This can be filtered to specific GPUs. |
160+
| `--runtime nvidia` | Specifies the Nvidia runtime, which provides the necessary drivers and tools from the host. |
81161

82-
The compose syntax is slightly different for this as you will need to set nvidia as the default runtime:
162+
For Docker Compose, you must first configure the Nvidia runtime as the default on the host:
83163

84164
```
85165
sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
86-
sudo service docker restart
166+
sudo systemctl restart docker
87167
```
88168

89-
And to assign the GPU in compose:
169+
Then, assign the GPU to the service in your `compose.yaml`:
90170

91171
```
92172
services:
93-
kalilinux:
173+
kali-linux:
94174
image: lscr.io/linuxserver/kali-linux:latest
95175
deploy:
96176
resources:
@@ -101,10 +181,31 @@ services:
101181
capabilities: [compute,video,graphics,utility]
102182
```
103183

104-
### Strict reverse proxies
184+
### Application Management
105185

106-
This image uses a self-signed certificate by default. This naturally means the scheme is `https`.
107-
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).
186+
There are two methods for installing applications inside the container: PRoot Apps (recommended for persistence) and Native Apps.
187+
188+
#### PRoot Apps (Persistent)
189+
190+
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.
191+
192+
To install an application, use the command line inside the container:
193+
194+
```
195+
proot-apps install filezilla
196+
```
197+
198+
A list of supported applications is available [here](https://github.com/linuxserver/proot-apps?tab=readme-ov-file#supported-apps).
199+
200+
#### Native Apps (Non-Persistent)
201+
202+
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`:
203+
204+
```yaml
205+
environment:
206+
- DOCKER_MODS=linuxserver/mods:universal-package-install
207+
- INSTALL_PACKAGES=libfuse2|git|gdb
208+
```
108209
109210
## Usage
110211
@@ -121,21 +222,16 @@ services:
121222
kali-linux:
122223
image: lscr.io/linuxserver/kali-linux:latest
123224
container_name: kali-linux
124-
security_opt:
125-
- seccomp:unconfined #optional
126225
environment:
127226
- PUID=1000
128227
- PGID=1000
129228
- TZ=Etc/UTC
130-
- SUBFOLDER=/ #optional
131-
- "TITLE=Kali Linux" #optional
132229
volumes:
133230
- /path/to/data:/config
134-
- /var/run/docker.sock:/var/run/docker.sock #optional
135231
ports:
136232
- 3000:3000
137233
- 3001:3001
138-
shm_size: "1gb" #optional
234+
shm_size: "1gb"
139235
restart: unless-stopped
140236
```
141237
@@ -144,17 +240,13 @@ services:
144240
```bash
145241
docker run -d \
146242
--name=kali-linux \
147-
--security-opt seccomp=unconfined `#optional` \
148243
-e PUID=1000 \
149244
-e PGID=1000 \
150245
-e TZ=Etc/UTC \
151-
-e SUBFOLDER=/ `#optional` \
152-
-e TITLE="Kali Linux" `#optional` \
153246
-p 3000:3000 \
154247
-p 3001:3001 \
155248
-v /path/to/data:/config \
156-
-v /var/run/docker.sock:/var/run/docker.sock `#optional` \
157-
--shm-size="1gb" `#optional` \
249+
--shm-size="1gb" \
158250
--restart unless-stopped \
159251
lscr.io/linuxserver/kali-linux:latest
160252
```
@@ -170,12 +262,8 @@ Containers are configured using parameters passed at runtime (such as those abov
170262
| `-e PUID=1000` | for UserID - see below for explanation |
171263
| `-e PGID=1000` | for GroupID - see below for explanation |
172264
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
173-
| `-e SUBFOLDER=/` | Specify a subfolder to use with reverse proxies, IE `/subfolder/` |
174-
| `-e TITLE=Kali Linux` | String which will be used as page/tab title in the web browser. |
175265
| `-v /config` | abc users home directory |
176-
| `-v /var/run/docker.sock` | Docker Socket on the system, if you want to use Docker in the container |
177-
| `--shm-size=` | We set this to 1 gig to prevent modern web browsers from crashing |
178-
| `--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. |
266+
| `--shm-size=` | Recommended for all desktop images. |
179267

180268
## Environment variables from files (Docker secrets)
181269

readme-vars.yml

Lines changed: 5 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -21,69 +21,17 @@ param_usage_include_ports: true
2121
param_ports:
2222
- {external_port: "3000", internal_port: "3000", port_desc: "Web Desktop GUI"}
2323
- {external_port: "3001", internal_port: "3001", port_desc: "Web Desktop GUI HTTPS"}
24-
param_usage_include_env: true
25-
param_env_vars:
26-
- {env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
27-
# optional variables
28-
opt_param_usage_include_env: true
29-
opt_param_env_vars:
30-
- {env_var: "SUBFOLDER", env_value: "/", desc: "Specify a subfolder to use with reverse proxies, IE `/subfolder/`"}
31-
- {env_var: "TITLE", env_value: "Kali Linux", desc: "String which will be used as page/tab title in the web browser."}
32-
opt_param_usage_include_vols: true
33-
opt_param_volumes:
34-
- {vol_path: "/var/run/docker.sock", vol_host_path: "/var/run/docker.sock", desc: "Docker Socket on the system, if you want to use Docker in the container"}
35-
opt_custom_params:
36-
- {name: "shm-size", name_compose: "shm_size", value: "1gb", desc: "We set this to 1 gig to prevent modern web browsers from crashing"}
37-
opt_security_opt_param: true
38-
opt_security_opt_param_vars:
39-
- {run_var: "seccomp=unconfined", compose_var: "seccomp:unconfined", desc: "For Docker Engine only, many modern gui apps need this to function on older hosts as syscalls are unknown to Docker."}
24+
custom_params:
25+
- {name: "shm-size", name_compose: "shm_size", value: "1gb", desc: "Recommended for all desktop images."}
26+
# Selkies blurb settings
27+
selkies_blurb: true
28+
show_nvidia: true
4029
# application setup block
4130
app_setup_block_enabled: true
4231
app_setup_block: |
4332
The application can be accessed at:
4433
4534
* https://yourhost:3001/
46-
47-
48-
### Security
49-
50-
>[!WARNING]
51-
>Do not put this on the Internet if you do not know what you are doing.
52-
53-
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.
54-
55-
### Nvidia GPU Support
56-
57-
**Nvidia support is not compatible with Alpine based images as Alpine lacks Nvidia drivers**
58-
59-
Nvidia support is available by leveraging Zink for OpenGL support. This can be enabled with the following run flags:
60-
61-
| Variable | Description |
62-
| :----: | --- |
63-
| --gpus all | This can be filtered down but for most setups this will pass the one Nvidia GPU on the system |
64-
| --runtime nvidia | Specify the Nvidia runtime which mounts drivers and tools in from the host |
65-
66-
The compose syntax is slightly different for this as you will need to set nvidia as the default runtime:
67-
68-
```
69-
sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
70-
sudo service docker restart
71-
```
72-
73-
And to assign the GPU in compose:
74-
75-
```
76-
services:
77-
kalilinux:
78-
image: lscr.io/linuxserver/kali-linux:latest
79-
deploy:
80-
resources:
81-
reservations:
82-
devices:
83-
- driver: nvidia
84-
count: 1
85-
capabilities: [compute,video,graphics,utility]
86-
```
8735
# init diagram
8836
init_diagram: |
8937
"kali-linux:latest": {

0 commit comments

Comments
 (0)