How to define docker-compose to run nodebb in docker with non root user?

General Discussion
  • Hi, I recently tried to run nodebb in docker, but I didn't find a suitable sample docker-compose file to define nodebb docker user non root. I tried to use PGID/PUID or user in docker-compose file, but it is not work. when I tried to use PGID/PUID in environment, the node still run as root. when I tried to use user, the node runs as user, but report error "error: Error: EACCES: permission denied, open '/usr/src/app/public/installer.css"

    So is there anybody could give me some advice for it, thanks!


        image: nodebb/docker
        container_name: nodebb
          - mongodb 
          - appdata/nodebb/data:/data
          #- PGID=1001
          #- PUID=1001
          #- user=docker1
        user: "1001"  
          - "4567:4567"
        restart: unless-stopped
          - app-nodebb

Suggested Topics