content:serverbasics:docker
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| content:serverbasics:docker [2025/02/08 12:30] – [Update] obel1x | content:serverbasics:docker [2026/03/01 11:44] (aktuell) – [Fast Stop of all Containers] obel1x | ||
|---|---|---|---|
| Zeile 28: | Zeile 28: | ||
| A short hint: Docker rootless uses Sub(g)uids, which is a feature of Linux. That means each user has a range of userids (quite a huge range) and groupid which the user may use. Those will be exclusive reserved for that user. But it does not mean, that the User can acces the Files created by those Subuids! Also the UIDs are onyl a number - not a real user in Linux having a username- They cannot be used to logon or to work with. Docker manages internally which Host-Subuserid is assigned to which caontainer and to which userid inside the running container/ | A short hint: Docker rootless uses Sub(g)uids, which is a feature of Linux. That means each user has a range of userids (quite a huge range) and groupid which the user may use. Those will be exclusive reserved for that user. But it does not mean, that the User can acces the Files created by those Subuids! Also the UIDs are onyl a number - not a real user in Linux having a username- They cannot be used to logon or to work with. Docker manages internally which Host-Subuserid is assigned to which caontainer and to which userid inside the running container/ | ||
| + | |||
| + | ===== Which Devices / Raid- Level ===== | ||
| + | |||
| + | I strongly do not advise to use Raid5 with classical harddrives to run docker on it. If you plan to have large Data in / | ||
| + | |||
| + | For me, i switched to RAID1 on SSD an mounted that to / | ||
| ===== Packages NOT to install ===== | ===== Packages NOT to install ===== | ||
| Zeile 318: | Zeile 324: | ||
| '' | '' | ||
| - | **by default, the path and the file is not existent, __create it new__ within the docker user**. | + | **by default, the path and the file is not existent, __create it new__ within the docker user**. |
| For example, enable IPv6. See [[https:// | For example, enable IPv6. See [[https:// | ||
| Zeile 324: | Zeile 330: | ||
| { | { | ||
| - | " | ||
| " | " | ||
| - | " | + | " |
| + | " | ||
| + | " | ||
| + | " | ||
| " | " | ||
| " | " | ||
| Zeile 335: | Zeile 343: | ||
| </ | </ | ||
| - | Notice: Don't use '' | + | Notice: Don't use '' |
| Edit: " | Edit: " | ||
| Zeile 342: | Zeile 350: | ||
| Maybe use this tool to generate: [[https:// | Maybe use this tool to generate: [[https:// | ||
| + | |||
| + | |||
| + | ==== The default Network is not IPV6- enabled by default ==== | ||
| + | |||
| + | If you specify no network, or use the network: default - than as the time of writing, IPV6 will not be enabled by default. | ||
| + | |||
| + | So, in your docker-compose.yml you need the lines: | ||
| + | < | ||
| + | |||
| + | networks: | ||
| + | # Still needs to be defined while without it won't enable ipv6 | ||
| + | default: | ||
| + | driver: bridge | ||
| + | enable_ipv6: | ||
| + | |||
| + | </ | ||
| ===== Networking in Docker rootless ===== | ===== Networking in Docker rootless ===== | ||
| Zeile 348: | Zeile 372: | ||
| Instead the network is encapsulated in the environement of rootlesskit and not visible to the host. From the Hosts view Docker is just another Application running on your Host talking to the internet like some app would do. | Instead the network is encapsulated in the environement of rootlesskit and not visible to the host. From the Hosts view Docker is just another Application running on your Host talking to the internet like some app would do. | ||
| + | |||
| + | ===== Performance ===== | ||
| + | |||
| + | when you install pasta- networking driver, you can edit your docker systemd and use a much improved networking-driver. | ||
| + | |||
| + | Also you can make Docker a higher Priority and Nice-Value: | ||
| + | |||
| + | < | ||
| + | docker@server: | ||
| + | |||
| + | [Service] | ||
| + | # Higher Prio for Docker | ||
| + | Nice=10 | ||
| + | IOSchedulingClass=best-effort | ||
| + | IOSchedulingPriority=7 | ||
| + | # Use Pasta- network Driver (of your Host - Pasta needs to be installed) | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | Environment=" | ||
| + | |||
| + | </ | ||
| ===== Install docker compose ===== | ===== Install docker compose ===== | ||
| Zeile 411: | Zeile 456: | ||
| </ | </ | ||
| - | |||
| ===== Create a place for Yamls ===== | ===== Create a place for Yamls ===== | ||
| Zeile 484: | Zeile 528: | ||
| Now you can go to [[http:// | Now you can go to [[http:// | ||
| - | {{ | + | {{ |
| Thats all: Docker is running and serving your services, cheers! | Thats all: Docker is running and serving your services, cheers! | ||
| Zeile 492: | Zeile 536: | ||
| This makes life easy '' | This makes life easy '' | ||
| < | < | ||
| - | |||
| #!/bin/bash | #!/bin/bash | ||
| docker stop $(docker ps -a -q) | docker stop $(docker ps -a -q) | ||
| Zeile 498: | Zeile 541: | ||
| </ | </ | ||
| + | ===== Find the latest Commit in git ===== | ||
| + | |||
| + | Sometimes the Repository does not offer a latest Tatg, so its hard to find the right Tag to use. Maybe this coding helps (not testet wheter to get the right commitid for the Image): | ||
| + | |||
| + | < | ||
| + | if [ -z ${TVHEADEND_COMMIT+x} ]; then \ | ||
| + | TVHEADEND_COMMIT=$(curl -sX GET https:// | ||
| + | | jq -r '. | .sha' | ||
| + | fi && \ | ||
| + | |||
| + | </ | ||
content/serverbasics/docker.1739014252.txt.gz · Zuletzt geändert: von obel1x
