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