Run containers with non-root user


#1

Hi,

The article https://medium.com/lucjuggery/running-a-container-with-a-non-root-user-e35830d1f42a suggests the best practice for docker containers is to run with least privileged access wherever possible. To achieve this, for our deployments we’re wrapping the loraserver, app server and gateway in Dockerfiles that move the executable to the /home directory and set the user:group to nobody:nogroup.

For example:

FROM loraserver/loraserver:2.5.0
RUN mv /root/loraserver /home/
USER nobody:nogroup
WORKDIR /home
ENTRYPOINT ["./loraserver"]

I wanted to see if that’s something the community would be open to adding to the base docker images. If so, I’d be happy to open PRs for that.

Best!
John