OMV7 with Compose, trying to (re)install Plex. Example Plex compose file fails on Docker up command with “Top-level object must be a mapping”. Tried several other Example files (dokuwiki, audiobookshelf, bookstack) and Plex file from Linuxserver.io.; all give same error.
This problem is self-inflicted, as I had a system problem that resulted in me trying to remove Plex and docker from my system and attempting to reinstall them. At this point, I believe that it is a simple mistake I made in the removal/reinstall of Compose and/or Docker, but I don’t know what that mistake could be. If somebody happens to know, that would be great, otherwise I would appreciate knowing how to properly remove Docker and Compose (where I think my error occurred) so that I can reinstall it.
My system is a Celeron-based PC with 4GB of memory, a 4TB system disk and 24TB data disk. It was built 5 years ago with OMV5, portainer, docker and plex, and was updated to OMV7 last year.
Debian GNU/Linux, with Linux 6.12.33+deb12-amd64
Openmediavault 7.7.13-2 (Sandworm)
docker-ce 5:28.3.3-1~debian.12~bookworm
docker-compose-plugin 2.39.1-1~debian.12~bookworm
Thank you in advance for any help/insight that you might provide.
You menitoned the docker compose plugin, but it is still worth checking if you are also using the right command. docker compose and not docker-compose as @bluepuma77 pointed out, however, I don’t think that kind of yaml issue would happen compose files as compose’s top-level object was always required to be a mapping.
Removing compose is easy, as it is just a binary without data and you can could uninstall Docker by removing the package and the data dir and the $HOME/.docker folder but Docker itself has nothing to do with the compose yaml syntax so I doubt that would help.
You could try this compose file:
services:
web:
image: nginx
with this command:
docker compose up -d
You could try checking the line endings in your file:
file compose.yml
It should return something like this:
compose.yml: ASCII text
and not this:
compose.yml: ASCII text, with CRLF, LF line terminators
If you get the first one, please show the compose version
docker compose version
The following could reveal some issues as well:
docker info
docker version
Review the output before sharing and remove confidential data if any appears (public IP for example)
The Compose plugin, as listed in OMV7’s | System | Plugins list:
openmediavault-compose 7.6.12
OpenMediaVault compose plugin
Installed
This plugin enhances OpenMediaVault by providing a comprehensive solution for managing Docker containers and their resources. Key features include: * Docker-Compose Management: Maintain and execute Docker Compose files. * Automated Backups: Schedule regular backups of containers to ensure data integrity. * Backup Restoration: Restore backups to minimize downtime. * Cleanup Automation: Automatically purge outdated images, containers, and resources. * Container Monitoring: Access statistics on running containers. * Image Status Tracking: Monitor image statuses and relevant metrics. * Network Management: Create and manage Docker networks. * Log Viewing: View logs for your containers. The openmediavault-cterm plugin is a mandatory requirement of this plugin.
Compose file (example plex from OMV7. Note, the indenting on the compose file appears correct in the original, but was lost multiple times in me trying to insert in this post. I truly appreciate the help, but my free time is very limited. I):
Please, format your post according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.
Example code block:
```
echo "I am a code."
echo "An athletic one, and I wanna run."
```
After fixing your post, please send a new comment so people are notified about the fixed content.
Problem resolved by doing a clean install of OS, et al.
Thank you for your time. I believe that the problem stemmed from one of more artifacts left in the system by the upgrade to OMV7 plus the first attempt at removal/reinstall. Where there was one bug there could be many, and this gives me the most stable solution. Plus it turned out to be the most expeditious.
If I need to ask for assistance in the future, I will take the time to learn the editor before I post.