Skip to content

Instantly share code, notes, and snippets.

@Saanch
Last active April 13, 2017 10:08
Show Gist options
  • Select an option

  • Save Saanch/7e832638c05ee85dd693fee72faf23bb to your computer and use it in GitHub Desktop.

Select an option

Save Saanch/7e832638c05ee85dd693fee72faf23bb to your computer and use it in GitHub Desktop.

Revisions

  1. Sanu Sathyaseelan revised this gist Apr 13, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions centos-docker.md
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,8 @@

    ## Add user to the sudo list(the following group is specific to the centos)
    `usermod -aG wheel username`
    ### For ubuntu
    `usermod -aG sudo username`

    ## test user is added to the sudoers list
    `sudo ls -la /root`
  2. Sanu Sathyaseelan revised this gist Apr 13, 2017. 1 changed file with 23 additions and 30 deletions.
    53 changes: 23 additions & 30 deletions centos-docker.md
    Original file line number Diff line number Diff line change
    @@ -1,41 +1,34 @@
    #ssh to server#
    ```ssh root@ip```
    ## ssh to server
    `ssh root@ip`

    #add new user for managing docker#
    adduser username
    ## Add new user for managing docker
    `adduser username`

    set password for the user
    passwrd username
    ## Set password for the user
    `passwrd username`

    add user to the sudo list(the following group is specific to the centos)
    usermod -aG wheel username
    ## Add user to the sudo list(the following group is specific to the centos)
    `usermod -aG wheel username`

    test user is added to the sudoers list
    sudo ls -la /root
    ## test user is added to the sudoers list
    `sudo ls -la /root`

    if the ablove steps fails we need to add the username to the sudoers list manually

    login to the new user
    su - username

    install docker client
    curl -sSL https://get.docker.com/ | sh

    If you would like to use Docker as a non-root user, you should now consider
    adding your user to the "docker" group with something like:
    sudo usermod -aG docker username

    Remember that you will have to log out and back in for this to take effect!
    logout

    start docker service
    sudo service docker start

    test the docker service
    docker ps -a
    if the ablove steps fails we need to add the username to the sudoers list manually

    ## login as the new user
    `su - username`

    ## Install docker client
    `curl -sSL https://get.docker.com/ | sh`

    If you would like to use Docker as a non-root user, you should now consider adding your user to the `docker` group with something like:

    `sudo usermod -aG docker username`

    Remember that you will have to log out and back in for this to take effect! logout

    ## Start docker service
    `sudo service docker start`

    ## Test the docker service
    `docker ps -a`
  3. Sanu Sathyaseelan created this gist Jan 4, 2017.
    41 changes: 41 additions & 0 deletions centos-docker.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    #ssh to server#
    ```ssh root@ip```

    #add new user for managing docker#
    adduser username

    set password for the user
    passwrd username

    add user to the sudo list(the following group is specific to the centos)
    usermod -aG wheel username

    test user is added to the sudoers list
    sudo ls -la /root

    if the ablove steps fails we need to add the username to the sudoers list manually

    login to the new user
    su - username

    install docker client
    curl -sSL https://get.docker.com/ | sh

    If you would like to use Docker as a non-root user, you should now consider
    adding your user to the "docker" group with something like:
    sudo usermod -aG docker username

    Remember that you will have to log out and back in for this to take effect!
    logout

    start docker service
    sudo service docker start

    test the docker service
    docker ps -a