1

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?
    – Ajay
    Commented Jun 27 at 11:19
  • Added just now!
    – mcheong246
    Commented Jun 27 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.
    – Ajay
    Commented Jun 28 at 11:01
  • 1
    This worked, thanks!
    – mcheong246
    Commented Jun 28 at 17:55

0

Your Answer

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

Browse other questions tagged or ask your own question.