sonar-scala / sonar-scala-docker

Docker images and docker-compose recipes with sonar-scala plugin for SonarQube providing support for Scala with Scoverage, Scalastyle and Scapegoat.

Home Page:https://sonar-scala.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Are you trying to mount a directory onto a file (or vice-versa)?

sslavian812 opened this issue · comments

Hi,
I'm trying to run your container with docker-compose: docker-compose up


ERROR: for sonar_sonarqube-lts_1  Cannot start service sonarqube-lts: b'OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \\"rootfs_linux.go:58: mounting \\\\\\"/Users/me/sonar/conf/sonar-lts.properties\\\\\\" to rootfs \\\\\\"/var/lib/docker/overlay2/9f7bac542604862b6c0750cfcfa90a3ad01fcf679632b3d0acf755d4e02bfcf8/merged\\\\\\" at \\\\\\"/var/lib/docker/overlay2/9f7bac542604862b6c0750cfcfa90a3ad01fcf679632b3d0acf755d4e02bfcf8/merged/opt/sonarqube/conf/sonar.properties\\\\\\" caused \\\\\\"not a directory\\\\\\"\\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type'

ERROR: for sonarqube-lts  Cannot start service sonarqube-lts: b'OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \\"rootfs_linux.go:58: mounting \\\\\\"/Users/me/sonar/conf/sonar-lts.properties\\\\\\" to rootfs \\\\\\"/var/lib/docker/overlay2/9f7bac542604862b6c0750cfcfa90a3ad01fcf679632b3d0acf755d4e02bfcf8/merged\\\\\\" at \\\\\\"/var/lib/docker/overlay2/9f7bac542604862b6c0750cfcfa90a3ad01fcf679632b3d0acf755d4e02bfcf8/merged/opt/sonarqube/conf/sonar.properties\\\\\\" caused \\\\\\"not a directory\\\\\\"\\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type'
ERROR: Encountered errors while bringing up the project.

Apparently, conf/sonar-lts.properties and conf/sonar.properties are indeed directories.
How this problem can be fixed?

The compose should work.
I had been using it for a while.

However, I had a problem similar to yours.
By any chance are you using Docker for windows?
If so, from where are you executing the comand? CMD, Powershell, GitBash, WSL?

That's a good point @BalmungSan, it does look like a Windows thing.
Maybe some suggestions in this thread could help you solve the problem codekitchen/dinghy#241 (comment).

Oh, that was exactly what I was going to point out.
I just wanted to be sure he/she was using Docker for Windows.

Basically, you need to share the drives where you have your files.
If already shared. But, you changed your credentials, you need to unshare and share again, and restart the service.

On the office, we had to change passwords every 20 days.
Thus, that bite me a few months ago.
It is in fact, extremely tedious to re-share the drives once a month.