Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

docker sudo how to add user

FROM alpine:latest
RUN apk --no-cache update 
    && apk --no-cache add sudo
copy run.sh /usr/local/
RUN addgroup -S cassandra && adduser -S cassandra -G cassandra
RUN chown -R cassandra:cassandra /home/cassandra/
RUN echo 'cassandra  ALL=(ALL) /bin/su' >>  /etc/sudoers
USER cassandra
ENTRYPOINT [ "sh","/usr/local/run.sh"]
Comment

add user to docker group so you dont have to use sudo with docker commands

sudo usermod -aG docker $USER
sudo reboot
Comment

PREVIOUS NEXT
Code Example
Shell :: undo git pull origin master into feature branch 
Shell :: composer xampp windows 
Shell :: git pull without checkout 
Shell :: change commit author 
Shell :: *** WARNING : deprecated key derivation used 
Shell :: install wireshark ubuntu 
Shell :: kill a process at a port 
Shell :: change language to english in centos 
Shell :: how to link a directory in linux 
Shell :: How to install p12 certificate in ubuntu 
Shell :: windows service start 
Shell :: install homebrew mac m1 
Shell :: 10 digit validation in jquery 
Shell :: spaceship zsh 
Shell :: gnutls_handshake() failed: An unexpected TLS packet was received. 
Shell :: linux ssh with password in one line 
Shell :: ngrok download authtoken 
Shell :: git rewrite commit message 
Shell :: ubuntu list running applications 
Shell :: ubuntu download file from url 
Shell :: sourcetree change commit message 
Shell :: bash read file line by line 
Shell :: git cherry pick 
Shell ::  
Shell :: command to check pip3 version on linux 
Shell :: turn off jenkins mac 
Shell :: gitflow install linux 
Shell :: see journalctl running logs 
Shell :: install tmux fedora 
Shell :: kali linux 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =