artix-install_and_configure_docker.sh 493 B

12345678910111213141516171819202122232425
  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. if [[ -z $init ]]; then
  11. export init="dinit"
  12. fi
  13. if [[ "$init" == "dinit" ]]; then
  14. #$su pacman -S docker docker-openrc
  15. #$su rc-update add docker default
  16. #$su rc-service docker start
  17. $su pacman -S docker docker-dinit
  18. $su dinitctl enable docker
  19. $su dinitctl start docker
  20. fi
  21. $su groupadd docker
  22. $su gpasswd -a $USER docker