call-of-duty-2-docker-server icon indicating copy to clipboard operation
call-of-duty-2-docker-server copied to clipboard

✨ Run the server process using a non-root user

Open bgauduch opened this issue 5 years ago • 0 comments

We first need to find a way to properly handle permissions on game files volume mount, and then use a non-root runtime user.

Exemple user setup to be added in the Dockerfile:

# setup the server non-root user
ENV SERVER_USER="cod2"
RUN addgroup -S ${SERVER_USER} && adduser -S -D -G ${SERVER_USER} ${SERVER_USER}
USER ${SERVER_USER}

bgauduch avatar Jun 16 '20 15:06 bgauduch