Echo-Server
Echo-Server copied to clipboard
Run docker container as non privileged user (node with UID 1000?)
Is your feature request related to a problem? Please describe. At the moment docker image runs as root user which is not good from security perspective.
Describe the solution you'd like
Run docker container at leas as built-in node
user with UID 1000.
Describe alternatives you've considered Build custom image which is not great idea.
Additional context Want to run this image in K8s as non root.
docker run -d -p 3000:80 --user 1000 ealen/echo-server:0.8.10
I tried to run the docker with user 1000, it worked, so I think it should also work in k8s, maybe like this
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
containers:
- name: my-container
image: my-image
securityContext:
runAsUser: 1000