14.install_docker.sh 362 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. # Set superuser privileges command if not set
  7. if [[ -z $su ]]; then
  8. export su="sudo"
  9. fi
  10. $su wget -qO- https://get.docker.com/ | sh
  11. $su groupadd docker || true
  12. $su gpasswd -a $USER docker || true
  13. docker --version
  14. #$su gpasswd -a ${USER} docker
  15. #$su service docker restart
  16. #newgrp docker