Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image in root user only when using local postgre db #508

Open
mtafer opened this issue Mar 8, 2023 · 0 comments
Open

Image in root user only when using local postgre db #508

mtafer opened this issue Mar 8, 2023 · 0 comments

Comments

@mtafer
Copy link

mtafer commented Mar 8, 2023

Entry point requires root user, however, I prefer not using root user to start this image in our Kubernetes cluster

Affected lines in entrypoint script

if [[ "$URL" = "jdbc:postgresql://127.0.0.1:5432/pulsar_manager" ]]
then
echo 'Starting PostGreSQL Server'

addgroup pulsar
adduser --disabled-password --ingroup pulsar pulsar
mkdir -p /run/postgresql
chown -R pulsar:pulsar /run/postgresql/
mkdir -p /data
chown -R pulsar:pulsar /data
chown pulsar:pulsar /pulsar-manager/init_db.sql
chmod 750 /data

su - pulsar -s /bin/sh /pulsar-manager/startup.sh
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant