1

I installed docker via rancher desktop on MacOS and I have been using docker for several months. Now something happened automagical (not possible) and I am not able to start some of containers eg kafka, via docker-compose.

I have docker-compose.yml file:

version: '3.7'
services:

  kafka:
    image: confluentinc/cp-server:5.5.0
    restart: always
    ports:
      - "29092:29092"
    environment:
      KAFKA_BROKER_ID: 1
  // ... other props 
    command: /create.sh
    volumes:
      - ./create.sh:/create.sh
      - ./t.config:/t.config

I want to start this container docker-compose up -d and got an error:

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/create.sh": permission denied: unknown

Environment

% docker --version
Docker version 20.10.17-rd, build c2e4e01

% docker-compose --version
Docker Compose version v2.11.1

Rancher Desktop Version: 1.6.1

I read a lot of posts and the most possible is that my file does not have correct permissions but:

% ls -l create.sh 
-rwxr-xr-x  1 myUser  u  1083 Oct 26 16:08 create.sh

I tried to change permission in container:

    command: chmod a+x /create.sh && /create.sh

then docker image began restart again and again without any log files.

I also allowed my Rancher desktop full disk access

enter image description here

I tried to downgrade rancher by install older version https://docs.rancherdesktop.io/getting-started/installation/

I am not able to addGroup as macOs user Docker Rancher - Permission Denied when using docker from WSL

Finally, it works on another computers (macOS, linux).

Is there any other thing I can check / change to verify the issue?

I checked that my container store directory instead of my volume files and as I read here Single file volume mounted as directory in Docker, there is something wrong with my files. Should I configure something in mac preferences as I think could do something in mac settings few months ago that's why all containers has been working.

ITCR
  • 11
  • 3

1 Answers1

1

I found a solution mention here https://github.com/rancher-sandbox/rancher-desktop/issues/1209#issuecomment-1370181132

Basically this is because of how rancher engine mount. So you have to direct it to use mountType: 9p

James
  • 13,571
  • 6
  • 61
  • 83