I was trying to enable HTTPS on the container and didn't realize that the container couldn't access the host file system. Noob mistake and still learning docker. I am trying to copy the files from container to the host and back, but I can't determine the directory structure.
I have tried sudo docker cp dockerid:/data/settings.js but it says not found is there something I am missing or is the folder structure different?
Actually it's a separate filesystem. The container is "self contained" and can't "see" the host's filesystem at all by default. You need to tell Docker to map a part of the host's filesystem into the container and you do that by adding a --volume or --mount to the "docker run" command you're using. For example, here's one I use:
-v /data/node-red:/data
This tells Docker to map the host's "/data/node-red" path to the container's "/data" path. Then you can go to your host's "/data/node-red" directory and see the same files as the container has in it's "/data" directory, and vice versa.
I was able to get it working by editing /var/lib/docker/volumes/node-red/_data/settings.js. I had to disable HTTPS and exclude the certificates that I was trying to do. I had created a let's encrypt ssl in the host and copied the files to /data/fullchain.pem and /data/privkey.pem but for some reason says file cannot be found when docker tries to start.
Thank you for the quick response now to get the next part solved.