I’m using Wowza Streaming Engine on the k8s cluster with volume mounted ‘recording-file’ directory and ‘logs’ directory.
However I’m having trouble setting user permssion.
Since the container run with root user, logs and recorded media files are created with root:root permission. It’s occurring couple of issues - other processes could not find the files created by Wowza container.
So I’ve tried to set User as 2001 who runs the container, but got permission errors; /sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
So, is there proper ways to deploy wowza engine with 2001:2001 user permission? The main point is created files should has 2001:2001 permission.
Below is my Dockerfile which is in progress of solving the issues I’ve mentioned above.
The ‘logs’ and ‘recording-file’ directories are permissioned as 2001:2001.
Thank you in advance!
FROM wowzamedia/wowza-streaming-engine-linux:4.9.7
ENV NVIDIA_DRIVER_CAPABILITIES=all
RUN apt-get update && apt-get install -y \
vim \
libogg-dev \
libglu1-mesa-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/local/WowzaStreamingEngine
RUN groupadd -r -g 2001 myuser && \
useradd -r -u 2001 -g myuser myuser
RUN chown -R myuser:myuser /usr/local/WowzaStreamingEngine
USER myuser
// ... COPY & ADD configs and plugins ...
USER root
EXPOSE 1935 8088
ENTRYPOINT ["/sbin/entrypoint.sh"]