Problem starting Docker image on Ubuntu

Having tried out YouTrack back when it was a zip distribution, I want to try the Docker image now.

Following the instructions, I ran the following from the command line to use the same host paths as inside the container (hopefully).

docker run -it --name foo \
-v /opt/youtrack/data:/opt/youtrack/data \
-v /opt/youtrack/conf:/opt/youtrack/conf \
-v /opt/youtrack/logs:/opt/youtrack/logs \
-v /opt/youtrack/backups:/opt/youtrack/backups \
-p 8080:8080 \
jetbrains/youtrack:2025.3.114121

Initially, I got errors about “error while creating mount source path file exists”.

Now, after some faffing about, somehow those errors are no longer shown, but now I see “Config directory is not writable: /opt/youtrack/conf” every time I start the container.

The host directory /opt/youtrack/conf has “drwxrwxr-x 2 13001 13001 4096” so it should be writable by “the user account that runs YouTrack service inside the containeraccording to the instructions.

What am I doing wrong?

0
4 comments

Hello! 

I've tried to reproduce this in my Ubuntu 24.04.2 LTS test environment, but didn't get any errors. Let's see what might be the case here. To troubleshoot, please make sure there are no leftover files/directories from the ZIP installation by recreating the directories:

  1. Remove the existing /opt/youtrack directory and its subdirectories. 
  2. Create the directories again, be sure to set the permissions (file mode) of the directories to 750

    mkdir -p -m 750 <path to data directory> \
    <path to logs directory> \
    <path to conf directory> \
    <path to backups directory>
  3. Set the permissions for both: the containing directory and its subdirectories

    chown -R 13001:13001 /opt/youtrack/
  4. Run the container

If the issue persists, please send us the Docker logs and share your Ubuntu version. 

Looking forward to hearing back from you. 

0

Hi, Stanislav, thanks for writing. I'm using Ubuntu 24.04.3 LTS.

I recreated the directories per your instructions.

Now, on starting the container, I see:

(HTTP code 500) server error - error while creating mount source path ‘/host_mnt/opt/youtrack/dasta’: mkdir /host_mnt/opt/youtrack/data': no such file or directory

The only Docker container log in /var/lib/docker/containers/ is for the HelloWorld example.

0

Hello! 

Thank you for the follow-up. 

The presence of 'host_mnt' in the error message indicates that you are using Docker Desktop rather than the native Docker for Linux. Docker Desktop runs containers inside a virtual machine. The VM layer in Docker Desktop automatically translates file ownership. This changes the approach. 

First, delete the existing directories. Then, recreate the directories; do not apply chown, and leave the directories as they are after creation. Proceed to run the docker run command. Please be sure to fix the typos host_mnt/opt/youtrack/dasta

Please don't hesitate to reach out anytime if you have any questions. Have a nice day! 

0

Thanks, Stanislav. I abandoned Docker Desktop and set YouTrack up successfully using just Docker Engine.

0

Please sign in to leave a comment.