Peristence problem with all-in-one docker image

Hi hi,

I have just upgraded to the all-in-one docker image, but I’ve been struggling to get the volume to mount properly, and as a result, I’m losing all my data every time I recreate the container.

I’m running docker on UnRAID 6.9.2 (linux kernel 5.10.28), which provides a built-in GUI for managing docker containers. The GUI generates the docker run command based on user input into a webform.

I installed the container following the instructions on dockerhub, which generated the following command:

docker run \
  -d \
  --name='baserow-1' \
  --net='bridge' \
  -e TZ="Europe/London" \
  -e HOST_OS="Unraid" \
  -e 'BASEROW_PUBLIC_URL'='http://192.168.10.111' \
  -p '8089:80/tcp' \
  -p '447:443/tcp' \
  -v '/mnt/user/appdata/baserow/data/':'baserow_data':'rw' \
  'baserow/baserow'

This threw the following error:

docker: Error response from daemon: invalid volume specification: '/mnt/user/appdata/baserow/data/:baserow_data:rw': invalid mount config for type "bind": invalid mount path: 'baserow_data' mount path must be absolute.

I also noticed that the -v argument that was generated by UnRAID is backwards compared to the docs, but is the same as all my other working containers - that is, my other containers all use -v '/host/path/':'/container/path' and work fine.

Since the error message referred to the path needing to be absolute, I tried the following:

docker run \
  -d \
  --name='baserow-1' \
  --net='bridge' \
  -e TZ="Europe/London" \
  -e HOST_OS="Unraid" \
  -e 'BASEROW_PUBLIC_URL'='http://192.168.10.111' \
  -p '8089:80/tcp' \
  -p '447:443/tcp' \
  -v '/mnt/user/appdata/baserow/data/':'/baserow_data':'rw' \
  'baserow/baserow'

This ran successfully, but the container stopped immediately with this error:

Please run baserow with a mounted data folder 'docker run -v baserow_data:/baserow/data ...', otherwise your data will be lost between runs. To disable this check set the DISABLE_VOLUME_CHECK env variable to 'yes' (docker run -e DISABLE_VOLUME_CHECK=yes ...).

After fiddling with the UnRAID GUI a bit I managed to reverse the -v argument, and ran:

docker run \
  -d \
  --name='baserow-1' \
  --net='bridge' \
  -e TZ="Europe/London" \
  -e HOST_OS="Unraid" \
  -e 'BASEROW_PUBLIC_URL'='http://192.168.10.111' \
  -p '8089:80/tcp' \
  -p '447:443/tcp' \
  -v baserow_data:/mnt/user/appdata/baserow/data
  'baserow/baserow' 

and just for fun, the same command with -v 'baserow_data':'/mnt/user/appdata/baserow/data':'rw'
This succeeds and baserow starts successfully, but nothing is being written to /mnt/user/appdata/baserow/data so there’s no persistence. There are no errors in the baserow log that I can see.

Although I can’t see anything in this command that looks incorrect, just in case, I bypassed the GUI altogether and ran

docker run \
  -d \
  --name baserow-1 \
  --net='bridge'
  -e BASEROW_PUBLIC_URL=http://192.168.10.111:8089 \
  -p 8089:80 \
  -p 447:443 \
  -v baserow_data:/mnt/user/appdata/baserow/data \
  baserow/baserow:latest

With the same result - baserow runs and doesn’t throw any errors, but doesn’t write any data.

I’m not sure if this is an issue with my commands, with the image, or a weird interaction with UnRAID - but I’d be grateful for any suggestions.

@EKC Could you try with

-v /mnt/user/appdata/baserow/data:/baserow/data ?

I don’t see anywhere on our dockerhub page which recommends using the invalid command

  -v '/mnt/user/appdata/baserow/data/':'baserow_data':'rw' \

Check out this page for more info on how volumes work in Docker: Use volumes | Docker Documentation.

My go to understanding of the -v flag is:

-v HOST_LOCATION_OR_NAMED_DOCKER_VOLUME:CONTAINER_LOCATION

Baserow stores all of its data in the /baserow/data CONTAINER_LOCATION and so any volume command which doesn’t mount this specific folder inside the container to a location on the host or named docker volume wont work.

Amazing, thankyou - it’s always good when the answer is simple!

The command -v '/mnt/user/appdata/baserow/data/':'baserow_data':'rw' is what was generated by UnRAID when I filled out the GUI fields according to the docs, along with all the other non-standard stuff like HOST_OS. After switching baserow_data to baserow/data, UnRAID generated this command:

docker run \
  -d \
  --name='baserow-1' \
  --net='bridge' \
  -e TZ="Europe/London" \
  -e HOST_OS="Unraid" \
  -e 'BASEROW_PUBLIC_URL'='http://192.168.10.111:8089' \
  -p '8089:80/tcp' \
  -p '447:443/tcp' \
  -v '/mnt/user/appdata/baserow/data/':'/baserow/data':'rw' \
  'baserow/baserow'

Which is working like a charm. :slight_smile:

I can’t see a way to submit a pull request to include this info in the docs, so would be grateful if someone else could. Thanks for the help & all the hard work on this great project.

Glad to hear it worked! We’ll be including an unraid section in the docs for the next release :slight_smile:

1 Like

A post was split to a new topic: Unraid community app