docker-compose error service name mapping not a string
[root@Odin immich-app]# ls -la
total 12
drwxr-xr-x 2 root root 44 Aug 23 21:04 .
drwxr-xr-x. 4 root root 38 Aug 23 20:33 ..
-rw-r--r-- 1 root root 2800 Aug 22 00:46 docker-compose.yml
-rw-r--r-- 1 root root 996 Aug 23 20:42 .env
[root@Odin immich-app]# docker-compose up
ERROR: In file './docker-compose.yml', service 'name' must be a mapping not a string.
[root@Odin immich-app]#
I´ve only changed the few variables in .etc
Running an old fedora server.
Anyone know the cause or problem?
28 Replies
:wave: Hey @Leijonfalk,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time).
2. :blue_square: read applicable release notes.
3. :blue_square: reviewed the FAQs for known issues.
4. :blue_square: reviewed Github for known issues.
5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy).
6. :blue_square: uploaded the relevant information (see below).
7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.[root@Odin immich-app]# more .env
UPLOAD_LOCATION=/mnt/nas/Immich/
DB_DATA_LOCATION=./postgres
TZ=Europe/Stockholm
IMMICH_VERSION=release
DB_PASSWORD=hidden
DB_USERNAME=admin
DB_DATABASE_NAME=immich
[root@Odin immich-app]#
your version of docker is too old. you should probably update it
alternatively you could remove the name line, but there will probably be other issues too
also you need to use
docker compose
- not docker-compose
https://immich.app/docs/install/requirements/Usin fedora 27, updated docker earlier today. Thanks for the help though, much appreciated!
probably from the use of docker-compose then if I Had to guess
Maybe docker is way too old aswell, i get
[root@Odin immich-app]# docker compose
docker: 'compose' is not a docker command.
docker-compose
is the old Python tool that calls out to Docker that has been EOL since 2022. docker compose
is built into Docker and is how you're meant to use docker-compose files nowadays.aaah alright
Try updating your Docker CLI+engine
[root@Odin immich-app]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-60.git9cb56fd.fc27.x86_64
Go version: go1.9.7
Git commit: 9c9378f-unsupported
Built: Sun Jul 8 08:52:30 2018
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-60.git9cb56fd.fc27.x86_64
Go version: go1.9.7
Git commit: 9c9378f-unsupported
Built: Sun Jul 8 08:52:30 2018
OS/Arch: linux/amd64
Experimental: false
Yeah your docker was built 7 years ago
that's a little old haha
😄 might explain it..
Have you not done any system updates on your server since 2018?
Docker requires Fedora 41 or 42 now
Fedora 27 officially enters End Of Life (EOL) status on November 30, 2018
Bruh
you should 100% not be running this system anywhere reallyNah its just been sitting to be honest, struggled with updating it to 29 and since then its been at that.
Local media server at most
I think you would keep running into issues if you just tried to upgrade the docker
IMO you should install a modern OS and copy any files you need over
focus on the OS first
Yeah i see the issue, just a hassle reinstalling the few services ive got when im so out of touch with linux. Uncertain how to do it efficiently while running raid setup.
If you want to stay on Fedora, install Fedora 42. Otherwise, I'd recommend a more production-grade OS like AlmaLinux
All in all, i better get working on it then 😄
#off-topic can help 😛
That's not to say Fedora isn't stable. It's perfectly fine and if you're familiar with it, keep using it
Cheers and thanks for the assist both of ya 🙂
Definitely don't expose that system to the internet btw @Leijonfalk, there might be major security holes. For example, if you're running Samba with vfs_fruit, you have a bug where untrusted remote users can execute arbitrary code as root: https://www.trendmicro.com/en_us/research/22/b/the-samba-vulnerability-what-is-cve-2021-44142-and-how-to-fix-it.html
Once you're running up-to-date software, there's much less to worry about.
If you don't want to have to worry about major updates, I'd suggest switching to Debian. You can usually stay on a major version for a really long time and still get security updates.
Debian is good, bullseye (from 2021) is still supported until August 2026
There's also the option of just running a rolling distro and never needing a fresh install
(or distro upgrade, sometimes you can do those and migrate an existing system to a newer version)