Skip to content

Commit d836e43

Browse files
committed
update README.md
1 parent 9cf451c commit d836e43

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

debian-jwm/README.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,24 @@ It usually doesn't matter because most distros only use 1 - 6, and 7 for display
1010
**1. Installation (creating a container)**
1111
```
1212
docker create -it --name debian_jwm \
13-
--cap-add SYS_ADMIN --cap-add SYS_TTY_CONFIG --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
14-
--device /dev/tty --device /dev/tty0 --device /dev/tty7 --device /dev/tty10 \
15-
--device /dev/input --device /dev/psaux \
16-
--device /dev/bus/usb --device /dev/usb \
17-
--device /dev/snd \
18-
--device /dev/dri --device /dev/fb0 --device /dev/video0 --device /dev/vga_arbiter \
13+
--privileged --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
1914
-v /run/udev/control:/run/udev/control:ro -v /run/udev/data:/run/udev/data:ro \
2015
-v /etc/localtime:/etc/localtime:ro \
2116
nggit/debian-jwm:bookworm
2217
```
23-
At this point, you can add other volume bindings if you want to share data between the host and the container, using the ` -v` or ` -volume` flags. Because partitions like **/dev/sda1**, etc. are by default not exposed to containers for security reasons.
2418

25-
If the container cannot be created in the above way, for example there is a different device path on your device, you can customize it yourself. Or more simply use *privileged* mode to access all devices. But this also means ignoring the security aspect.
19+
That should be fine in most cases.
20+
21+
If you are an advanced user, you might want to fine-tune the security to avoid the `--privileged` flag on container creation.
22+
But this may require some patience to match the device. For example device `/dev/video0` could be `/dev/video10` on another device, availability of `/dev/psaux` etc.
2623
```
2724
docker create -it --name debian_jwm \
28-
--privileged --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
25+
--cap-add SYS_ADMIN --cap-add SYS_TTY_CONFIG --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
26+
--device /dev/tty --device /dev/tty0 --device /dev/tty7 --device /dev/tty10 \
27+
--device /dev/input --device /dev/psaux \
28+
--device /dev/bus/usb --device /dev/usb \
29+
--device /dev/snd \
30+
--device /dev/dri --device /dev/fb0 --device /dev/video0 --device /dev/vga_arbiter \
2931
-v /run/udev/control:/run/udev/control:ro -v /run/udev/data:/run/udev/data:ro \
3032
-v /etc/localtime:/etc/localtime:ro \
3133
nggit/debian-jwm:bookworm
@@ -40,6 +42,9 @@ You should see a line like the following at the end of the logs if the container
4042
```
4143
Debian GNU/Linux 12 246eb7415c97 console
4244
```
45+
46+
If not, try [deleting it](#stopping-and-deleting-the-container) then re-create the container.
47+
4348
If you want to make the container always run automatically even if the host is restarted, you can change the restart policy on the container to *always* or *unless-stopped*:
4449
```
4550
docker update --restart unless-stopped debian_jwm
@@ -83,6 +88,7 @@ Display Managers like lightdm default to `tty7`, and when first running will dis
8388

8489
The main problem is `tty7`. Make sure your host is not using lightdm on that `tty7` as well.
8590
## Stopping and deleting the container
91+
In the case you want to re-create the containers.
8692
```
8793
docker stop debian_jwm
8894
docker rm debian_jwm

debian-mate/README.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,24 @@ It usually doesn't matter because most distros only use 1 - 6, and 7 for display
1010
**1. Installation (creating a container)**
1111
```
1212
docker create -it --name debian_mate \
13-
--cap-add SYS_ADMIN --cap-add SYS_TTY_CONFIG --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
14-
--device /dev/tty --device /dev/tty0 --device /dev/tty7 --device /dev/tty10 \
15-
--device /dev/input --device /dev/psaux \
16-
--device /dev/bus/usb --device /dev/usb \
17-
--device /dev/snd \
18-
--device /dev/dri --device /dev/fb0 --device /dev/video0 --device /dev/vga_arbiter \
13+
--privileged --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
1914
-v /run/udev/control:/run/udev/control:ro -v /run/udev/data:/run/udev/data:ro \
2015
-v /etc/localtime:/etc/localtime:ro \
2116
nggit/debian-mate:bookworm
2217
```
23-
At this point, you can add other volume bindings if you want to share data between the host and the container, using the ` -v` or ` -volume` flags. Because partitions like **/dev/sda1**, etc. are by default not exposed to containers for security reasons.
2418

25-
If the container cannot be created in the above way, for example there is a different device path on your device, you can customize it yourself. Or more simply use *privileged* mode to access all devices. But this also means ignoring the security aspect.
19+
That should be fine in most cases.
20+
21+
If you are an advanced user, you might want to fine-tune the security to avoid the `--privileged` flag on container creation.
22+
But this may require some patience to match the device. For example device `/dev/video0` could be `/dev/video10` on another device, availability of `/dev/psaux` etc.
2623
```
2724
docker create -it --name debian_mate \
28-
--privileged --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
25+
--cap-add SYS_ADMIN --cap-add SYS_TTY_CONFIG --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
26+
--device /dev/tty --device /dev/tty0 --device /dev/tty7 --device /dev/tty10 \
27+
--device /dev/input --device /dev/psaux \
28+
--device /dev/bus/usb --device /dev/usb \
29+
--device /dev/snd \
30+
--device /dev/dri --device /dev/fb0 --device /dev/video0 --device /dev/vga_arbiter \
2931
-v /run/udev/control:/run/udev/control:ro -v /run/udev/data:/run/udev/data:ro \
3032
-v /etc/localtime:/etc/localtime:ro \
3133
nggit/debian-mate:bookworm
@@ -40,6 +42,9 @@ You should see a line like the following at the end of the logs if the container
4042
```
4143
Debian GNU/Linux 12 246eb7415c97 console
4244
```
45+
46+
If not, try [deleting it](#stopping-and-deleting-the-container) then re-create the container.
47+
4348
If you want to make the container always run automatically even if the host is restarted, you can change the restart policy on the container to *always* or *unless-stopped*:
4449
```
4550
docker update --restart unless-stopped debian_mate
@@ -83,6 +88,7 @@ Display Managers like lightdm default to `tty7`, and when first running will dis
8388

8489
The main problem is `tty7`. Make sure your host is not using lightdm on that `tty7` as well.
8590
## Stopping and deleting the container
91+
In the case you want to re-create the containers.
8692
```
8793
docker stop debian_mate
8894
docker rm debian_mate

0 commit comments

Comments
 (0)