2

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 . .
4
  • Welcome to DevOps! Can you also include your Dockerfile along with your question? Commented Jun 27, 2024 at 11:19
  • Added just now! Commented Jun 27, 2024 at 16:51
  • Looks like the docker or docker group does not have permission to make a folder in the path. Update your permissions and try again. Commented Jun 28, 2024 at 11:01
  • I can also confirm that switching from VirtioFS to gRPC FUSE is a fix for "error while creating mount source path ... file exists". Using gRPC FUSE worked for me using docker on macOS. Commented Jan 26 at 4:03

1 Answer 1

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.