diff --git a/README.md b/README.md index c47a5391390c..479f97d053fc 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,12 @@ Once you have the podman remote socket you can run Dozzle on podman. podman run --volume=/run/user/1000/podman/podman.sock:/var/run/docker.sock -d -p 8080:8080 amir20/dozzle:latest ``` +Additionally you have to create a fake engine-id to prevent ```host not found``` errors. Podman doesn´t generate an engine-id like Docker by itself due to its daemonless architecture. + +Under ```/var/lib/docker``` create a file named ```engine-id```, on a system with Podman you will have to creater the folder path as well. Inside the file place a UUID, for instance using ```uuidgen > engine-id```. After that the file should have an identifier that looks like this: ```b9f1d7fc-b459-4b6e-9f7a-e3d1cd2e14a9```. + +For more details check [Podman Infos](docs/guide/podman.md) or the [FAQ](docs/guide/faq.md#i-am-seeing-host-not-found-error-in-the-logs-how-do-i-fix-it) + ## Security Dozzle supports file based authentication and forward proxy like [Authelia](https://www.authelia.com/). These are documented at https://dozzle.dev/guide/authentication. diff --git a/docs/guide/faq.md b/docs/guide/faq.md index 1040bcce4b89..a5fc1826eeec 100644 --- a/docs/guide/faq.md +++ b/docs/guide/faq.md @@ -91,6 +91,23 @@ Dozzle uses the Docker API to gather information about the hosts. Each host must Somettimes, VMs maybe restored from back ups, with the same host ID. This can cause Dozzle to think that the host is already present and skip adding it to the list of hosts. To fix this, you need to remove `/var/lib/docker/engine-id` file. This file contains the host ID and is created when the Docker daemon starts. +## I am seeing host not found error in the logs. How do I fix it? + +This should be mainly a Podman only error: Using Podman doesn't create an engine-id like Docker. +If you are using Docker check if the ```engine-id``` file exists with correct permissions in ```/var/lib/docker``` and has the UUID inside. + +To resolve the error take following steps: + +1. Create the folders: ```mkdir -p /var/lib/docker``` +2. Install uuidgen if necessary +3. Using uuidgen generate an UUID: ```uuidgen > engine-id``` + +The engine-id file should now have an UUID inside. + +An example setup for Ansible can be found in [Podman](podman.md) + +It might be neccessary to clean up your existing dozzle deployment under Podman, stop the container and remove the associated data (container/volumes). After that you can redeploy the Dozzle container and your logs should now show up. + ## Why am I only seeing running containers? How do I see stopped containers? By default, Dozzle only shows running containers. To see stopped containers, you need to enable the `Show Stopped Containers` option in the settings. This option is disabled by default to reduce the number of containers shown in the UI. diff --git a/docs/guide/podman.md b/docs/guide/podman.md new file mode 100644 index 000000000000..83245289cb0f --- /dev/null +++ b/docs/guide/podman.md @@ -0,0 +1,45 @@ +--- +title: Podman +--- + +## I am seeing host not found error in the logs. How do I fix it? + +This should be mainly a Podman only error: Using Podman doesn't create an engine-id like Docker. +If you are using Docker check if the ```engine-id``` file exists with correct permissions in ```/var/lib/docker``` and has the UUID inside. + +It might be neccessary to clean up your existing dozzle deployment under Podman, stop the container and remove the associated data (container/volumes). After you created the engine-id you can redeploy the Dozzle container and your logs should now show up. + +## Create UUID + +Options for generating UUIDs + +### uuidgen + +:warning: Adjust folder/file permissions if necessary. There isn't an critial info but depending on your existing setup you might want to take additional steps + +1. Install uuidgen +2. Create the folders: ```mkdir -p /var/lib/docker``` +3. Using uuidgen generate an UUID: ```uuidgen > /var/lib/docker/engine-id``` +4. Verify with ```cat /var/lib/docker/engine-id``` + +### Ansible + +:warning: Depending on your setup you might have to take adjustments for file/folder permissions. The following task snippets would run as the become_user of the playbook running these tasks. + +If you wish to adjust the user have to set individual become/become_user parameters for the task. + +``` +- name: Create /var/lib/docker + ansible.builtin.file: + path: /var/lib/docker + state: directory + mode: '755' + +- name: Create engine-id and derive UUID from hostname + ansible.builtin.lineinfile: + path: /var/lib/docker/engine-id + line: "{{ hostname | to_uuid }}" + create: true + mode: "0644" + insertafter: "EOF" +```