<p>In my case, switching from <code>VirtioFS</code> to <code>gRPC FUSE</code> in <em>Docker desktop &gt; Settings &gt; General &gt; Virtual Machine Options</em> fixed it.</p>

CC BY-SA 4.0
2024-11-23T22:08:28.990Z
2024-11-23T22:08:28.990Z
Faiz Farouk
<p>I am new to Docker. I am trying to run a container on MacOS. However, when I run:</p>
<pre><code>docker compose up -d --build
</code></pre>
<p>I get the following error:</p>
<pre><code>Error response from daemon: error while creating mount source path '/host_mnt/Users/admin/Desktop/ModelFly/atryon': mkdir /host_mnt/Users/admin/Desktop: operation not permitted
</code></pre>
<p>I don't know if this has something to do with the permissions of the source directory. Here is my <code>docker-compose.yml</code> file:</p>
<pre><code>version: '3'

services:
  extension:
    container_name: extension
    hostname: extension
    restart: always
    tty: true
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - 5173:5173
    volumes:
      - .:/usr/src/app
    command: yarn dev --host
    networks:
      - default
    platform: linux/amd64

networks:
  default:
</code></pre>
<p><code>Dockerfile</code>:</p>
<pre><code>FROM node:20-alpine

WORKDIR /usr/src/app

COPY package*.json ./

RUN yarn install

COPY . .
</code></pre>

CC BY-SA 4.0
2024-06-27T11:19:28.487Z
Welcome to DevOps! Can you also include your Dockerfile along with your question?
Ajay
CC BY-SA 4.0
2024-06-27T16:51:05.267Z
Added just now!
mcheong246
CC BY-SA 4.0
2024-06-28T11:01:30.567Z
Looks like the docker or docker group does not have permission to make a folder in the path. Update your permissions and try again.
Ajay
CC BY-SA 4.0
2024-06-28T17:55:15.467Z
This worked, thanks!
mcheong246
<docker><docker-compose>
Docker: error while creating mount source path
mcheong246
# Docker: error while creating mount source path

(Asked by: username_0 on 2024-06-26)

I am new to Docker. I am trying to run a container on MacOS. However, when I run:
docker compose up -d --build

I get the following error:
Error response from daemon: error while creating mount source path '/host_mnt/Users/admin/Desktop/ModelFly/atryon': mkdir /host_mnt/Users/admin/Desktop: operation not permitted

I don't know if this has something to do with the permissions of the source directory. Here is my docker-compose.yml file:
version: '3'

services:
  extension:
    container_name: extension
    hostname: extension
    restart: always
    tty: true
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - 5173:5173
    volumes:
      - .:/usr/src/app
    command: yarn dev --host
    networks:
      - default
    platform: linux/amd64

networks:
  default:

Dockerfile:
FROM node:20-alpine

WORKDIR /usr/src/app

COPY package*.json ./

RUN yarn install

COPY . .

**Tags:** docker, docker-compose

> **Comments:**
> **username_1**: Welcome to DevOps! Can you also include your Dockerfile along with your question?  
> **username_0**: Added just now!  
> **username_1**: Looks like the docker or docker group does not have permission to make a folder in the path. Update your permissions and try again.  
> **username_0**: This worked, thanks!  

---

## 1 answers

### Answer by username_2 on 2024-11-23. Score: 0

In my case, switching from `VirtioFS` to `gRPC FUSE` in *Docker desktop > Settings > General > Virtual Machine Options* fixed it.


---

