kartoza / docker-pg-backup

A cron job that will back up databases running in a docker postgres container
GNU General Public License v2.0
452 stars 103 forks source link

Run as non-root #68

Closed phertweck closed 11 months ago

phertweck commented 2 years ago

Currently, the process in the container is running as root-user. Due to security reasons this is not recommended and even not easily possible in some environments (e.g. openShift).

I tried to add a new user and change the corresponding permissions. Unfortunately it still fails with the following error message:

cron: can't open or create /var/run/crond.pid: Permission denied

I didn't find any solution how to solve the permission issue with cron. Does anybody have an idea?

NyakudyaA commented 2 years ago

Unfortunately, the base image used kartoza/docker-postgis which has the same issue https://github.com/kartoza/docker-postgis/issues/245. We haven't invested much time in solving this, but I urge you to give it a go. Maybe try running it with gosu ?