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 :: ubuntu no space left on device boot 
Shell :: clear git cache 
Shell :: install brain.js 
Shell :: docker remove all images powershell 
Shell :: linux list environment variables 
Shell :: git abort changes 
Shell :: git credential manager 
Shell :: how to install gnu lib tool 
Shell :: ubuntu command get my ip 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =