make docker sudo less
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ newgrp docker
make docker sudo less
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ newgrp docker
setting docker as a non root user
##########################################
# Dockerfile to change from root to
# non-root privilege
###########################################
# Base image is CentOS 7
FROM Centos:7
# Add a new user "john" with user id 8877
RUN useradd -u 8877 john
# Change to non-root privilege
USER john
non-docker root
sudo setfacl -m user:$USER:rw /var/run/docker.sock
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us