DOCKER ON Centos8 RHEL permission denied all the time

There are lot of errors on permissions when it comes to centos8. Although firewalld was stopped including permissive setenforce[=0], still there are lots of error permission denied in NPM.

In an instance where I should allow others to +rwx just so I can start an npm. It was all the time. EACCES permission denied on ‘mkdir’ accessing /usr/local/lib, /usr/local, etc. compose-docker up cannot be properly executed. During docker-compose section. Running “docker-compose up” will not you move any further.

Please advice.

docker-compose.yml

version: “3.8”

services:
frontend:
depends_on:
- backend
user: root
build: ./frontend
ports:
- 3000:3000

backend:
depends_on:
- db
build: ./backend
user: root
ports:
- 3001:3001
environment:
DB_URL: mongodb://db/vidly
command: ./docker-entrypoint.sh

db:
image: mongo:4.0-xenial
ports:
- 27017:27017
volumes:
- vidly:/data/db

volumes:
vidly: