paulpierre/RasaGPT

Permission Error When Changing Permissions of 'wait-for-it.sh' in Docker Container

resulraveendran opened this issue · 4 comments

I encountered a permission error when attempting to change the permissions of the 'wait-for-it.sh' script within a Docker container. Here are the details: When i do make run

version: '3'
services:
  rasa-core:
    image: rasa/rasa:latest
    container_name: chat_rasa_core
    env_file:
      - .env
    volumes:
      - ./app/rasa:/app
      - ./app/scripts/wait-for-it.sh:/app/wait-for-it.sh
    ports:
      - 5005:5005
    entrypoint: ["/bin/bash", "-c", "chmod +x /app/wait-for-it.sh && /app/wait-for-it.sh rasa-credentials:8889 -t 120 -o && rasa run --enable-api --cors '*' --debug --credentials /app/credentials.yml --endpoints /app/endpoints.yml --model /app/models"]
    networks:
      - chat-network
    depends_on:
      - rasa-actions
      - rasa-credentials

Error message:

chmod: changing permissions of '/app/wait-for-it.sh': Operation not permitted

Steps to Reproduce:

1)open makefile path terminal
2)make run command
3)Monitor the logs of the chat_rasa_core container using docker logs chat_rasa_core --tail 100 -f.
4)Observe the permission error message when the chmod command is executed.

I have got same error how to solve

Same here

rasa-core default not running root in docker. you can edit docker-compose.yaml. add user: root:root

This change on docker-compose.yml ( user: root) works for me:

-----------------

Core Rasa service

-----------------

rasa-core:
image: rasa/rasa:latest
container_name: chat_rasa_core
user: root
env_file:
- .env
volumes:
- ./app/rasa:/app
- ./app/scripts/wait-for-it.sh:/app/wait-for-it.sh