Docker Installation with Raspberry Pi

Hello!
I am trying to install Vikunja using Docker with a Raspberry Pi Zero. I am able to pull down images using docker pull just fine, but whenever I try to run docker-compose up, I get the following error:

sudo docker-compose up
Pulling db (mariadb:10)...
10: Pulling from library/mariadb
ERROR: no matching manifest for linux/arm/v6 in the manifest list entries

I’m fairly new to docker, but I suspect that this just means that there is not an ARM/v6 build for mariadb. Am I reading that correctly? If so, do I just need to update the docker files to use something besides mariadb?

Thank you!

Yes, the official mariadb image is not available for arm. You have a few options to solve this:

  • Use Vikunja with sqlite instead of a DBMS (see the docs on how to configure this, if you do this make sure to mount the path to the sqlite db file to your host)
  • Use an unofficial mariadb image like this one
  • Using postgres instead of mariadb might also work.

Thanks! I tried the unofficial mariadb image but keeping getting the following errors:

api_1       | usermod: no changes
api_1       | 2021/08/22 00:19:42 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
api_1       | 2021/08/22 00:19:42 Using default config.
api_1       | 2021-08-22T00:19:45.427692108Z: CRITICAL  ▶ migration/Migrate 002 Migration failed: dial tcp 172.21.0.3:3306: connect: no route to host
api_1       | usermod: no changes
api_1       | 2021/08/22 00:20:14 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
api_1       | 2021/08/22 00:20:14 Using default config.
api_1       | 2021-08-22T00:20:17.668689328Z: CRITICAL  ▶ migration/Migrate 002 Migration failed: dial tcp 172.21.0.3:3306: connect: no route to host
api_1       | usermod: no changes
api_1       | 2021/08/22 00:20:36 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
api_1       | 2021/08/22 00:20:36 Using default config.
api_1       | 2021-08-22T00:20:39.43018419Z: CRITICAL   ▶ migration/Migrate 002 Migration failed: dial tcp 172.21.0.3:3306: connect: no route to host
api_1       | usermod: no changes
api_1       | 2021/08/22 00:20:58 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
api_1       | 2021/08/22 00:20:58 Using default config.
api_1       | 2021-08-22T00:21:01.667775247Z: CRITICAL  ▶ migration/Migrate 002 Migration failed: dial tcp 172.21.0.3:3306: connect: no route to host
api_1       | usermod: no changes
api_1       | 2021/08/22 00:21:20 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
api_1       | 2021/08/22 00:21:20 Using default config.
api_1       | 2021-08-22T00:21:23.908583387Z: CRITICAL  ▶ migration/Migrate 002 Migration failed: dial tcp 172.21.0.3:3306: connect: no route to host
vikunja_api_1 exited with code 1
vikunja_db_1 exited with code 11

I looked at the containers with docker ps. I noticed that the api container never has an assigned IP address occasionally, and the db container occasionally has one. There are not any containers with the IP address 172.21.0.3

This command yields the following:

sudo docker ps -q | xargs -n 1 sudo docker inspect --format '{{ .Name }} {{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' | sed 's#^/##';
vikunja_proxy_1  172.21.0.5
vikunja_api_1
vikunja_db_1 (sometimes this is 172.21.0.3)
vikunja_frontend_1  172.21.0.2

From what I have gathered so far, at the beginning, api_1 attempts to connect to 172.21.0.3 and fails because db_1 is not up. After db_1 turns on, it still keeps failing for some reason, even when I can see that db_1 is up and has an ip address. I think there might be an issue with opening the port on 3306, but I’m not sure. Is there anything obvious I should try next?

I’m also going through a few more docker tutorials so hopefully I’ll be able to figure this out on my own!

This looks like the db container doesn’t properly start and thus the Vikunja container fails to start because it cannot reach the db. The log message vikunja_db_1 exited with code 11 seems to confirm this. Are there any other logs from the db container?

Sometimes mariadb takes a bit of time until it completed its startup, have you tried waiting a bit?

Interesting! I waited roughly ~15 minutes to see if the db would start, and it never did. The errors kept cycling. Here’s the full log from the last 15 minutes.

For what it’s worth, I am using a Raspberry Pi Zero W, and I know other people have run into issues with it and docker for the pi-hole. Could this be related at all?

Yeah it shouldn’t take that long. Usually something like 20 seconds at most.

Maybe. This whole thing looks like an issue with the mariadb image so you might want to ask the maintainers of it. The linuxserver.io community is really helpful, they can probably help you better with that image than I can.

Another option would be to try postgres or sqlite. Given the ressource constraints of a pi zero, sqlite might be the best fit. Depends on what else you’re hosting on it.