Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
content:serverbasics:docker [2024/04/20 14:31] – [First Docker App: Portainer] Danielcontent:serverbasics:docker [2024/05/18 11:11] (aktuell) – [Update] Daniel
Zeile 1: Zeile 1:
-====== Docker (rootless) ======+====== Docker (rootless) + Portainer ======
  
 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 on will give you hints how to setup Docker in a good way.
Zeile 277: Zeile 277:
 ''~/.config/docker/daemon.json'' ''~/.config/docker/daemon.json''
  
-**by default, the path and the file is not existent, create it 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://docs.docker.com/config/daemon/ipv6/|https://docs.docker.com/config/daemon/ipv6/]] for details.+For example, enable IPv6. See [[https://docs.docker.com/config/daemon/ipv6/|https://docs.docker.com/config/daemon/ipv6/]] for details.
 <file> <file>
  
Zeile 285: Zeile 285:
  "experimental": true,  "experimental": true,
  "ip6tables": true,  "ip6tables": true,
 + "ipv6": true,
 + "fixed-cidr-v6": "fd12:3456:789a:1::/64",
  "log-opts": {  "log-opts": {
    "max-size": "10m",    "max-size": "10m",
Zeile 292: Zeile 294:
  
 </file> </file>
 +
 +You need to adjust cidr to match your network, check first 4 blocks of ''ip addr''
  
 Notice: Don't use ''userns-remap''  - this won't work and makes no sense in rootless. Notice: Don't use ''userns-remap''  - this won't work and makes no sense in rootless.
Zeile 297: Zeile 301:
 ===== Install docker compose ===== ===== Install docker compose =====
  
-The command ''docker-compose'' has been obsoleted and been replaced by a plugin ''compose'' for docker (see [[https://docs.docker.com/compose/install/|https://docs.docker.com/compose/install/]]).+The command ''docker-compose''  has been obsoleted and been replaced by a plugin ''compose''  for docker (see [[https://docs.docker.com/compose/install/|https://docs.docker.com/compose/install/]]).
  
 Installing it the manual way: Installing it the manual way:
  
-Edit the File ''~/.bashrc'' and add:+Edit the File ''~/.bashrc''  and add:
 <code> <code>
  
Zeile 325: Zeile 329:
  
 Your done with the compose plugin Your done with the compose plugin
 +
 +===== Update =====
 +
 +If you want to update your docker- installation, there is not update- process but to use the same script again:
 +
 +<file>
 +#!/bin/bash
 +#Upgrade docker rootless and plugin
 +systemctl --user stop docker
 +rm -f ~/bin/dockerd
 +curl -fsSL https://get.docker.com/rootless | sh
 +#need to give the new binary permissions to acces privileged network ports (beneath 1024)
 +sudo setcap 'cap_net_bind_service=+ep' ~/bin/rootlesskit
 +
 +# If you installed docker compose, check the newest version first at https://github.com/docker/compose/releases/latest
 +curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
 +
 +</file>
  
  
Zeile 331: Zeile 353:
 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. 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 ''mkdir ~/docker_compose'' and change to it.+Make a directory with ''mkdir ~/docker_compose''  and change to it. 
 ===== First Docker App: Portainer ===== ===== First Docker App: Portainer =====
  
Zeile 337: Zeile 360:
  
 As always, SSH into your docker- user and than create the folders and yml-files for docker compose and portainer. As always, SSH into your docker- user and than create the folders and yml-files for docker compose and portainer.
- 
 <code> <code>
 +
 obel1x@server:~> ssh localhost -l docker obel1x@server:~> ssh localhost -l docker
 Password: Password:
Zeile 395: Zeile 418:
 </code> </code>
  
-Now you can go to http://localhost:9000 and pick a password to finish the setup of Portainer using the local Environment and enjoy the docker-party:+Now you can go to [[http://localhost:9000|http://localhost:9000]] and pick a password to finish the setup of Portainer using the local Environment and enjoy the docker-party:
  
 {{  .:screenshot_20231221_101150.png?968x260  }} {{  .:screenshot_20231221_101150.png?968x260  }}
  • content/serverbasics/docker.1713623465.txt.gz
  • Zuletzt geändert: 2024/04/20 14:31
  • von Daniel