Docker Community Forums

Share and learn in the Docker community.

Docker: Error response from daemon: error while creating mount source path '/bdd': mkdir /bdd: read-only file system


(Creaprog) #1

Hello,

Terminal :

$ sudo docker run --name api -d -p 8080:8080 -v ${pwd}/bdd:/usr/src/app api
-> 78640cfa15f0025bf39b7b684f563caaf687ea8b5ac7206ac5436871ad391b00
docker: Error response from daemon: error while creating mount source path ‘/bdd’: mkdir /bdd: read-only file system.

Dockerfile :

FROM python:3.7
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
VOLUME /usr/src/app/
EXPOSE 8080
CMD [ “python”, “./server.py” ]

$ ls
-> bdd Dockerfile README.md requirements.txt server.py

My OS : Ubuntu 18.04

How to solve the problem ?

THX


(Martin Terp) #2

instead of ${pwd} in your -v
try provinding the full path instead.


(Creaprog) #3

You have reason^^

I’ve done everything but this…


(Martin Terp) #4

so it worked?

${pwd} is always the directory that you are in, so if you “cd /tmp/”, and run the “docker run” command, docker will assume that the bdd directory is in: /tmp/bdd


(Creaprog) #5

Yes thx :slight_smile: