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 [2023/12/29 15:36] – [... and the permissions of the files] obel1x | content:serverbasics:docker [2026/03/01 11:44] (aktuell) – [Fast Stop of all Containers] obel1x | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Docker ====== | + | ====== Docker |
| - | Docker is a powerful solution for setting up Services. This on will give you hints how to setup Docker in a good way. | + | Docker is a powerful solution for setting up Services. This short Introducion |
| - | Currently i am Experimenting | + | Currently i am experimenting |
| - | + | ||
| - | ===== Docker rootless ===== | + | |
| Docker itself is nice, but it will run as root per default, which is a no-go at all. This will setup Docker in rootless- mode on OpenSuSE (currently Leap 15.5). | Docker itself is nice, but it will run as root per default, which is a no-go at all. This will setup Docker in rootless- mode on OpenSuSE (currently Leap 15.5). | ||
| - | ==== Package ==== | + | __**Warning: |
| - | While Docker-Rootless is not in the main Repositories, | + | So just: Don't set up Docker |
| - | Then install the package '' | + | ===== Filesystem Layout ===== |
| - | ==== User ==== | + | |
| - | Create a new user and maybe give this user another home-directory, as it will store all files of docker. | + | Mind, that at the time writing, '' |
| - | Let's say choose home ''/ | + | I personally dislike xfs, especially while its not rubust and won't shrink. I use it anyway, because of its srong advise to do so - with kernel 5.19+ it should be possible to get overlay2 working on btrfs, but still there are things that may not work even with that kernel - in the worst case, docker |
| - | Also it may be a good choice, not to have this user added to '' | + | So make sure, that the Home-Directory of you docker |
| - | ==== Install rootless Docker ==== | + | |
| - | Warning: | + | Warning: |
| + | |||
| + | That may change the ownership in a way, that even the docker user on the host cannot access the Files, which is OK ! | ||
| + | |||
| + | __**STRONG WARNING: Don't change permissions or ownership of docker- directories on the Host directly as this will change them in the container, making them unavaiable and break your Services !!!**__ | ||
| + | |||
| + | __**The only way to manage Volume- File- Permissions is to bash inside the running container itself and to change them there (to the right values of course)!**__ | ||
| + | |||
| + | 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) | ||
| + | |||
| + | ===== 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 | ||
| + | |||
| + | I had really a lot of troubles with the package Docker-Rootless in the AddOn- Repository: '' | ||
| + | |||
| + | So i disabled the following packages and locked them to never install: | ||
| + | |||
| + | * docker | ||
| + | * docker-compose | ||
| + | * containerd | ||
| + | |||
| + | Check out beneath for install the docker way. | ||
| + | |||
| + | ===== Docker- User ===== | ||
| + | |||
| + | Create a new **group** | ||
| + | |||
| + | Attention: The Home Directory should be on a volume having XFS as btrfs or others are not fully supported right now (20.04.2024 - patches in new Kernel 5.19 are incoming, but this Kernel is not released until now and still there are some problems open in developement there). | ||
| + | |||
| + | ===== cGroups v2 ===== | ||
| + | |||
| + | OpenSuSE Leap 15.5 does not have cGroups v2 enabled, which are needed by docker. | ||
| + | |||
| + | You may see a warning (later) when running '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | According to this documentation [[https:// | ||
| + | |||
| + | '' | ||
| + | |||
| + | and also the delegation for the user of cpu is needed: | ||
| < | < | ||
| + | $ sudo mkdir -p / | ||
| + | $ cat <<EOF | sudo tee / | ||
| + | [Service] | ||
| + | Delegate=cpu cpuset io memory pids | ||
| + | EOF | ||
| + | $ sudo systemctl daemon-reload | ||
| + | |||
| + | </ | ||
| + | |||
| + | after this, reboot and check if ''/ | ||
| + | |||
| + | After installing docker (see beneath), check if '' | ||
| + | < | ||
| + | |||
| + | Cgroup Driver: systemd | ||
| + | Cgroup Version: 2 | ||
| + | |||
| + | </ | ||
| + | |||
| + | Than, its fine. | ||
| + | |||
| + | ===== Install rootless Docker ===== | ||
| + | |||
| + | Warning: You CANNOT sudo to the user and install docker, while logon via pam is needed, which is not when you sudo. You need to ssh into your machine, or yust logon in a usual way: | ||
| + | |||
| + | < | ||
| If you login in the system using either of | If you login in the system using either of | ||
| - graphical session | - graphical session | ||
| Zeile 35: | Zeile 103: | ||
| </ | </ | ||
| - | I chose to ssh into my machine directly: | + | I chose to ssh into my machine directly, than check your umask to be secure and install docker like this: |
| - | <file> | + | <code> |
| - | #> ssh localhost -l docker | + | # ~> ssh localhost -l docker |
| - | #> pwd | + | Password: |
| - | / | + | Have a lot of fun... |
| - | #> dockerd-rootless-setuptool.sh check | + | docker@pcserver2023: |
| - | [INFO] Requirements are satisfied | + | 0007 |
| - | #> dockerd-rootless-setuptool.sh install | + | docker@pcserver2023: |
| - | [INFO] Creating /srv/docker-user/ | + | # Installing stable version 25.0.2 |
| + | # Executing docker rootless install script, commit: 3b2a83b | ||
| + | % Total % Received % Xferd Average Speed | ||
| + | | ||
| + | 100 68.2M 100 68.2M 0 | ||
| + | % Total % Received % Xferd Average Speed | ||
| + | | ||
| + | 100 19.7M 100 19.7M 0 | ||
| + | + PATH=/ | ||
| + | + / | ||
| + | [INFO] Creating /home/ | ||
| [INFO] starting systemd service docker.service | [INFO] starting systemd service docker.service | ||
| + systemctl --user start docker.service | + systemctl --user start docker.service | ||
| Zeile 52: | Zeile 130: | ||
| + systemctl --user --no-pager --full status docker.service | + systemctl --user --no-pager --full status docker.service | ||
| ● docker.service - Docker Application Container Engine (Rootless) | ● docker.service - Docker Application Container Engine (Rootless) | ||
| - | | + | Loaded: loaded (/home/ |
| - | Active: active (running) since Tue 2023-12-19 17:53:39 CET; 3s ago | + | |
| - | Docs: https:// | + | |
| - | Main PID: 6774 (rootlesskit) | + | |
| - | CGroup: / | + | |
| - | ├─ | + | |
| - | p=auto --disable-host-loopback --port-driver=builtin --copy-up=/ | + | CPU: 224ms |
| - | in/ | + | CGroup: / |
| - | ├─ | + | |
| - | comp=auto --disable-host-loopback --port-driver=builtin --copy-up=/ | + | |
| - | r/ | + | |
| - | ├─ | + | |
| - | 85 tap0 | + | |
| - | ├─ | + | |
| - | └─ | + | |
| + DOCKER_HOST=unix:/// | + DOCKER_HOST=unix:/// | ||
| - | + /usr/bin/docker version | + | + /home/docker/bin/docker version |
| Client: | Client: | ||
| - | Version: | + | Version: |
| - | API version: | + | API version: |
| - | Go version: | + | Go version: |
| - | Git commit: | + | Git commit: |
| - | Built: | + | |
| - | OS/ | + | |
| - | Context: | + | |
| - | Server: | + | Server: |
| - | Engine: | + | |
| - | | + | Version: |
| - | API version: | + | API version: |
| - | Go version: | + | Go version: |
| - | Git commit: | + | Git commit: |
| - | | + | Built: |
| - | | + | OS/ |
| - | | + | Experimental: |
| - | containerd: | + | |
| - | | + | Version: |
| - | | + | GitCommit: |
| - | runc: | + | |
| - | | + | Version: |
| - | | + | GitCommit: |
| - | docker-init: | + | |
| - | | + | Version: |
| - | | + | GitCommit: |
| - | rootlesskit: | + | |
| - | | + | Version: |
| - | | + | ApiVersion: |
| - | | + | NetworkDriver: |
| - | | + | PortDriver: |
| - | | + | StateDir: |
| - | slirp4netns: | + | vpnkit: |
| - | | + | Version: |
| - | | + | |
| + systemctl --user enable docker.service | + systemctl --user enable docker.service | ||
| - | Created symlink /srv/docker-user/ | + | Created symlink /home/ |
| - | config/ | + | |
| [INFO] Installed docker.service successfully. | [INFO] Installed docker.service successfully. | ||
| [INFO] To control docker.service, | [INFO] To control docker.service, | ||
| Zeile 118: | Zeile 192: | ||
| [INFO] Make sure the following environment variable(s) are set (or add them to ~/.bashrc): | [INFO] Make sure the following environment variable(s) are set (or add them to ~/.bashrc): | ||
| - | export PATH=/usr/bin:$PATH | + | export PATH=/home/docker/bin:$PATH |
| [INFO] Some applications may require the following environment variable too: | [INFO] Some applications may require the following environment variable too: | ||
| export DOCKER_HOST=unix:/// | export DOCKER_HOST=unix:/// | ||
| - | </file> | + | </code> |
| - | So, this looks nice. | + | So, this looks very nice. **Important: |
| - | Mind, that now your volumes | + | ===== Check Docker install ===== |
| - | ==== Optional | + | |
| + | Log out of docker user if you are still in from install. Then, log back in to apply the bashrc- settings. | ||
| + | |||
| + | Ceck the Environement to have the settings: | ||
| + | < | ||
| + | |||
| + | docker@pcserver2023: | ||
| + | Connection to localhost closed. | ||
| + | obel1x@pcserver2023: | ||
| + | Password: | ||
| + | Last login: Sat Apr 20 15:18:56 2024 from ::1 | ||
| + | Have a lot of fun... | ||
| + | docker@pcserver2023: | ||
| + | unix:/// | ||
| + | |||
| + | </ | ||
| + | |||
| + | Now check '' | ||
| + | |||
| + | < | ||
| + | docker@pcserver2023: | ||
| + | Client: | ||
| + | | ||
| + | | ||
| + | Debug Mode: false | ||
| + | |||
| + | Server: | ||
| + | | ||
| + | Running: 0 | ||
| + | Paused: 0 | ||
| + | Stopped: 0 | ||
| + | | ||
| + | | ||
| + | | ||
| + | Backing Filesystem: xfs | ||
| + | Supports d_type: true | ||
| + | Using metacopy: false | ||
| + | Native Overlay Diff: false | ||
| + | userxattr: true | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | Volume: local | ||
| + | Network: bridge host ipvlan macvlan null overlay | ||
| + | Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog | ||
| + | | ||
| + | | ||
| + | | ||
| + | Init Binary: docker-init | ||
| + | | ||
| + | runc version: v1.1.12-0-g51d5e94 | ||
| + | init version: de40ad0 | ||
| + | | ||
| + | seccomp | ||
| + | | ||
| + | rootless | ||
| + | cgroupns | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | CPUs: 8 | ||
| + | Total Memory: 30.79GiB | ||
| + | Name: pcserver2023 | ||
| + | ID: 45699224-ea9c-4865-8dea-a53bb20b788c | ||
| + | | ||
| + | Debug Mode: false | ||
| + | | ||
| + | | ||
| + | 127.0.0.0/8 | ||
| + | Live Restore Enabled: false | ||
| + | | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Additional knowledge ==== | ||
| + | |||
| + | * Storage driver and FS-Type : overlay2 should always be used, btrfs is outdated! XFS and d_type are important! | ||
| + | * CGroup Version needs to be 2 or better | ||
| + | * If you see Docker complaining about Module aufs at start: do not care about - that module is obsolete | ||
| + | |||
| + | ===== IP-Filter ===== | ||
| + | |||
| + | When starting Docker, an the log says: | ||
| + | |||
| + | < | ||
| + | level=warning msg=" | ||
| + | level=info msg=" | ||
| + | |||
| + | </ | ||
| + | |||
| + | You first need to load the module with modprobe. | ||
| + | |||
| + | For system startup, use ''/ | ||
| + | |||
| + | ===== IPTables ===== | ||
| + | |||
| + | If you see '' | ||
| + | |||
| + | < | ||
| + | WARNING: bridge-nf-call-iptables is disabled | ||
| + | WARNING: bridge-nf-call-ip6tables is disabled | ||
| + | |||
| + | </ | ||
| + | |||
| + | This should be fixed by: | ||
| + | |||
| + | < | ||
| + | # sudo echo "net.bridge.bridge-nf-call-iptables = 1">> | ||
| + | # sudo echo " | ||
| + | # sudo modprobe br_netfilter | ||
| + | # sudo sysctl --system | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Configuring | ||
| in rootless-mode, | in rootless-mode, | ||
| Zeile 134: | Zeile 324: | ||
| '' | '' | ||
| - | by default, the path and the file is not existent, | + | **by default, the path and the file is not existent, |
| - | + | ||
| - | For example use another directory für your data in that file: | + | |
| + | For example, enable IPv6. See [[https:// | ||
| < | < | ||
| + | |||
| { | { | ||
| - | " | + | " |
| - | " | + | |
| - | " | + | |
| " | " | ||
| - | " | + | " |
| - | " | + | " |
| + | " | ||
| " | " | ||
| " | " | ||
| Zeile 154: | Zeile 343: | ||
| </ | </ | ||
| - | Here, ipv6 support has been turned on. See [[https:// | + | Notice: Don't use '' |
| - | Notice: Don't use '' | + | Edit: " |
| + | You need to adjust cidr to some unique ULA. ULAs are non internet routable adresses (like 192.X.X.X in ipv4). Select an unique adress only for that internal Docker network - you can choose anything that is not assigned anywhere else on your network to not cause trouble. | ||
| - | ===== Filesystem Layout ===== | + | Maybe use this tool to generate: [[https:// |
| - | Mind, that at the time writing '' | ||
| - | For checking which filesystem | + | ==== The default Network |
| - | < | + | |
| - | Storage Driver: overlay2 | + | |
| - | | + | |
| - | | + | |
| - | Using metacopy: false | + | |
| - | | + | |
| - | | + | |
| - | </ | + | If you specify no network, or use the network: default - than as the time of writing, IPV6 will not be enabled by default. |
| - | If you create a XFS-Filesystem with Leap 15.5 it will have '' | + | So, in your docker-compose.yml you need the lines: |
| + | <file> | ||
| - | For me, i like btrfs a bit more than xfs, so i chose to have three different locations for docker on two filesystems (which are raided lvms. Check out the other docs here): | + | networks: |
| - | + | # Still needs to be defined while without it won't enable ipv6 | |
| - | < | + | |
| - | #> mount | grep /srv | + | |
| - | / | + | enable_ipv6: |
| - | / | + | |
| </ | </ | ||
| - | and in /srv i have | + | ===== Networking |
| - | < | + | |
| - | #> ls /srv/ | grep docker | + | If you read docs in the net about networking with Docker you may see docker0 as bridge network. While this network |
| - | docker #-> for storing docker-data using xfs | + | |
| - | docker-compose #-> for my yaml-files | + | |
| - | docker-user # | + | |
| - | </ | + | 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. |
| - | ==== ... and the permissions of the files ==== | + | ===== Performance ===== |
| - | For me i would like the files only be read/ | + | when you install pasta- networking driver, you can edit your docker |
| + | |||
| + | Also you can make Docker a higher Priority and Nice-Value: | ||
| < | < | ||
| - | #:~ # cd /srv | + | docker@server:~> systemctl |
| - | #:/srv # chown docker docker* | + | |
| - | #:/srv # chgrp docker docker* -R | + | [Service] |
| - | #:/srv # setfacl -m d: | + | # Higher Prio for Docker |
| - | #:/srv # setfacl -m d:g::rwX -R docker* | + | Nice=10 |
| - | #:/srv # setfacl -m d:o::--- -R docker* | + | IOSchedulingClass=best-effort |
| - | #:/srv # setfacl | + | IOSchedulingPriority=7 |
| - | #:/srv # setfacl | + | # Use Pasta- network Driver (of your Host - Pasta needs to be installed) |
| - | #:/srv # setfacl | + | Environment=" |
| + | Environment=" | ||
| + | Environment=" | ||
| </ | </ | ||
| - | That way, others do not have any access to the files or folders. | + | ===== Install docker compose ===== |
| - | === Compatibility Mode === | + | **This Chapter may be obsolete as since docker v27 the compose plugin is part of installation script - check your output of '' |
| - | There are Dockers out there, that are not aware of rootless-modes. One example (date up to now) is phpmyadmin. It will create files in docker-start- script | + | The command '' |
| - | So you may change | + | Installing it the manual way: |
| + | Edit the File '' | ||
| < | < | ||
| - | #:~ # cd /srv | + | |
| - | #:/srv # setfacl | + | export DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} |
| - | #:/srv # setfacl -m o::r-X -R / | + | |
| - | #:/srv # setfacl -m d:o::--- -R / | + | |
| - | #:/srv # setfacl -m o::--- -R / | + | |
| </ | </ | ||
| - | The docker- daemon will create all files that are downloaded | + | Then relog to the docker |
| - | === Volume- Permissions === | + | < |
| + | docker@pcserver2023: | ||
| + | docker@pcserver2023: | ||
| + | % Total % Received % Xferd Average Speed | ||
| + | | ||
| + | 0 | ||
| + | 100 59.8M 100 59.8M 0 | ||
| + | docker@pcserver2023: | ||
| + | docker@pcserver2023: | ||
| + | Docker Compose version v2.26.1 | ||
| + | docker@pcserver2023: | ||
| - | Usually all the data- files are kept in Volumes. Unfortunatelly, | + | </ |
| - | So if you would like to have your files really secured from other user, you can create the volume | + | Your done with the compose plugin |
| - | '' | + | ===== Update ===== |
| - | That would make all files in the Volume have the right permissions. | + | |
| - | In Docker-Compose | + | If you want to update your docker- installation, |
| - | <code> | + | <file> |
| - | volumes: | + | #!/bin/bash |
| - | | + | #Upgrade docker rootless and plugin |
| - | | + | ./ |
| - | | + | sleep 5 |
| - | type: "" | + | systemctl --user stop docker |
| - | o: "umask=0007" | + | sleep 5 |
| + | # | ||
| + | rm -f ~/ | ||
| + | rm ~/ | ||
| + | mv ~/ | ||
| + | #reinstall docker compose | ||
| + | COMPOSE_VER=' | ||
| + | rm $DOCKER_CONFIG/ | ||
| + | echo " | ||
| + | curl -SL https:// | ||
| + | chmod +x $DOCKER_CONFIG/ | ||
| + | #install docker | ||
| + | curl -fsSL https:// | ||
| + | #need to give the new binary permissions to acces privileged network ports (beneath 1024) | ||
| + | sudo setcap ' | ||
| + | #this should be everything | ||
| + | docker info | ||
| - | </code> | + | </file> |
| - | Device and type need to be there, but can be empty to use default values. | + | ===== Create a place for Yamls ===== |
| + | Now, that you have compose, you can use it to setup your services with YAML- Files. Each service should have a directory for its own. | ||
| + | |||
| + | Make a directory with '' | ||
| ===== First Docker App: Portainer ===== | ===== First Docker App: Portainer ===== | ||
| - | Now - finally its time for our first running Container. As the Portainer- App is the most important Management- Software in Docker, let's run it in a safe userspaced way now. | + | Now - finally its time for our first running Container. As the Portainer- App is an important Management- Software in Docker |
| - | As always, SSH into your docker- user and than create the folders and yml-files for portainer. | + | As always, SSH into your docker- user and than create the folders and yml-files for docker compose and portainer. |
| + | < | ||
| - | < | ||
| obel1x@server: | obel1x@server: | ||
| - | |||
| Password: | Password: | ||
| - | docker@server:~> cd /srv/ | + | docker@pcserver2023:~> cd ~/docker_compose |
| - | docker@server:~> mkdir portainer | + | docker@pcserver2023:~/ |
| - | docker@server:/srv/ | + | docker@pcserver2023:~/docker_compose> cd portainer |
| - | docker@server:/srv/docker-compose/ | + | docker@pcserver2023:~/docker_compose> |
| - | # file: . | + | docker@pcserver2023:~/docker_compose> |
| - | # owner: docker | + | |
| - | # group: docker | + | |
| - | user::rwx | + | |
| - | group:: | + | |
| - | other:: | + | |
| - | default: | + | |
| - | default: | + | |
| - | default: | + | |
| - | + | ||
| - | docker@server:/srv/ | + | |
| </ | </ | ||
| - | put the following into that file: | + | Put the following into that file: |
| < | < | ||
| - | version: " | ||
| services: | services: | ||
| | | ||
| - | | + | |
| | | ||
| | | ||
| - 9000:9000 | - 9000:9000 | ||
| + | - 9433:9433 | ||
| | | ||
| - portainer_data:/ | - portainer_data:/ | ||
| Zeile 299: | Zeile 496: | ||
| volumes: | volumes: | ||
| | | ||
| - | | ||
| - | | ||
| - | type: "" | ||
| - | o: " | ||
| </ | </ | ||
| - | now start your app: | + | Check, that the Socket- Path is the correct one. |
| - | < | + | Now start your app and look the magic: |
| - | docker@server: | + | |
| - | [...] | + | |
| - | ⠿ Container portainer-portainer-1 | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | Check the volume has been created at the right location | + | |
| < | < | ||
| - | docker@server:~> docker | + | docker@pcserver2023:~/ |
| - | [ | + | [+] Running 12/12 |
| - | { | + | ✔ portainer Pulled |
| - | " | + | ✔ 379538b6d68e Pull complete |
| - | " | + | ✔ 4ea3e2c3a39b Pull complete |
| - | " | + | ✔ 5171176db7f2 Pull complete |
| - | "com.docker.compose.project": | + | ✔ 52e9438966a5 Pull complete |
| - | "com.docker.compose.version": | + | ✔ 43d4775415ac Pull complete |
| - | "com.docker.compose.volume": | + | ✔ c1cad9f5200f Pull complete |
| - | }, | + | ✔ 22eab514564f Pull complete |
| - | " | + | ✔ 962b9fa821a2 Pull complete |
| - | " | + | ✔ c153fefda5ce Pull complete |
| - | " | + | ✔ bed990c4615b Pull complete |
| - | " | + | ✔ 4f4fb700ef54 Pull complete |
| - | **" | + | [+] Running 3/3 |
| - | " | + | ✔ Network portainer_default |
| - | }, | + | ✔ Volume |
| - | " | + | ✔ Container portainer-portainer-1 |
| - | } | + | docker@pcserver2023:~/ |
| - | ] | + | |
| </ | </ | ||
| - | and finally if the files have been created only readable by the user: | + | Now you can go to [[http:// |
| - | < | + | {{ : |
| - | ls / | + | |
| - | -rw——- 1 docker docker 77 21. Dez 09:37 / | + | |
| - | / | + | Thats all: Docker is running and serving your services, cheers! |
| - | insgesamt 40 | + | |
| - | drwx——+ 2 docker docker 6 21. Dez 09:37 bin | + | |
| - | drwx——+ 2 docker docker 37 21. Dez 09:37 certs | + | |
| - | drwx——+ 2 docker docker 29 21. Dez 09:37 chisel | + | |
| - | drwx——+ 2 docker docker 6 21. Dez 09:37 compose | + | |
| - | drwx——+ 2 docker docker 25 21. Dez 09:37 docker_config | + | |
| - | -rw——- 1 docker docker 65536 21. Dez 09:37 portainer.db | + | |
| - | -rw——- 1 docker docker 227 21. Dez 09:37 portainer.key | + | |
| - | -rw——- 1 docker docker 190 21. Dez 09:37 portainer.pub | + | |
| - | drwx——+ 2 docker docker 6 21. Dez 09:37 tls | + | |
| - | / | + | ===== Fast Stop of all Containers ===== |
| - | insgesamt 0 | + | |
| - | /srv/docker/ | + | This makes life easy '' |
| - | insgesamt 8 | + | < |
| - | -rw——- 1 docker docker | + | #!/bin/bash |
| - | -rw——- 1 docker docker 227 21. Dez 09:37 key.pem | + | docker |
| + | docker | ||
| - | /srv/ | + | </file> |
| - | insgesamt 4 | + | ===== Find the latest Commit in git ===== |
| - | -rw——- 1 docker docker 227 21. Dez 09:37 private-key.pem | + | |
| - | / | + | 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): |
| - | insgesamt 0 | + | |
| - | /srv/docker/volumes/portainer_portainer_data/_data/docker_config: | + | < |
| - | insgesamt 4 | + | if [ -z ${TVHEADEND_COMMIT+x} ]; then \ |
| - | -rw-r—– 1 docker docker 389 21. Dez 09:37 config.json | + | TVHEADEND_COMMIT=$(curl -sX GET https://api.github.com/repos/tvheadend/tvheadend/commits/ |
| - | + | | jq -r '. | .sha'); \ | |
| - | / | + | fi && \ |
| - | insgesamt 0 | + | |
| </ | </ | ||
| - | |||
| - | this is amazing, right ;) ? | ||
| - | |||
| - | Now you can go to [[http:// | ||
| - | |||
| - | {{ .: | ||
| - | |||
| - | Thats all here, cheers! | ||
content/serverbasics/docker.1703860603.txt.gz · Zuletzt geändert: von obel1x
