DEV Community

Discussion on: HarperDB Containerization Journey

 
zaxharperdb profile image
Zachary Fowler Harper

Howdy.
I imagined first thing this was a permissions issue, however I was able to reproduce with just the /..
None the less!
Because the user in the Container is not root, it has a user id of 1000
Iff you are running docker commands as root the container does not have permissions to write to any directory on the host system.
Therefore, you need to run docker and create directories for the host system with a non root user.
It is considered a security risk to use the root user inside the container.
The container is built from node:12.16-alpine and they supply a non root user named node.
Let me know if I can provide any other insight.
Happy to help,
Zachary.

Thread Thread
 
pratikjagrut profile image
Pratik Jagrut

Oh, okay, then maybe I'll use podman to run it(rootless container).

Thread Thread
 
pratikjagrut profile image
Pratik Jagrut

Even with the podman I'm seeing same error. Now podman ensures rootless container. This problem only occurs when I try to use -v.