nats-io / k8s

NATS on Kubernetes with Helm Charts
Apache License 2.0
444 stars 300 forks source link

fix nats-box deployment so nats user can be used #882

Closed ddanat-smm closed 4 months ago

ddanat-smm commented 5 months ago

When installing nats-box with the helm chart the current implementation saves the current directory as the "work_dir". In the Dockerfile that is "/root". Even though the user "nats" with uid 1000 is created in the Dockerfile, if the current deployment (which just does a sleep infinity) starts as uid 1000, work_dir gets saved as "/root" and when the cd $work_dir comes, the container crashes. This fixes that issue.

Sorry if this doesn't quite adhere to your PR guidelines - this is just a quick and dirty commit

caleblloyd commented 5 months ago

I think a better fix may be changing the exec to:

exec /entrypoint.sh "$@"

Because the nats-box entrypoint already handles this logic

That will also not break anyone who is using workingDir

caleblloyd commented 4 months ago

Opened #883 with the change, closing this one