Run LocalStack as non-root in open shift - Permission denied


when trying to run localstack in a docker container on openshift, we getting the following error:

/usr/local/bin/ line 73: /var/lib/localstack/logs/localstack_infra.log: Permission denied

We are not able to run the container as root, so we set the corresponding parameters in the values.yaml file, runAsNonRoot: true and we set a corresponding user id. When starting localstack in a docker containing locally and I am checking the access rights for var/lib/localstack, I see that this directory has rwx access for everything but the underlying directories, for example the logs directory, only root has rwx access and the rest is set to read and executable only. So I assume that this is the issue when starting the container as non root.

So far we see as an only option to build the container ourself and change the permissions for the directory.

Or are we doing something wrong fundamentally?

Hope someone can help us out.




Quite possibly this was the same issue other users encountered while using LocalStack in OpenShift: Modify file ownership in localstack image to support Openshift deployments by crungehottman · Pull Request #6271 · localstack/localstack · GitHub

We have fixed the permission issues with LocalStack deployments in OpenShift now and we would recommend you to use the latest LocalStack image and clear the LocalStack volume directory on host. If you are not using the latest image and the issue still persists, we would like to know the LocalStack version you are using.