You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
714 B

  1. #!/usr/bin/env bash
  2. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. cd $DIR
  4. unset DIR
  5. # Import APT packages
  6. pdir="/offline_packages"
  7. abs_pdir="$(pwd)${pdir}"
  8. sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
  9. cat <<EOF > sources.list
  10. deb [trusted=yes] file://${abs_pdir} ./
  11. EOF
  12. sudo mv sources.list /etc/apt/sources.list
  13. # Install APT packages
  14. sudo apt-get update
  15. SELECTED_PACKAGES="wget unzip curl tar docker.io docker-compose"
  16. sudo apt-get install -y $SELECTED_PACKAGES
  17. # Cleanup
  18. sudo apt-get clean
  19. sudo mv /etc/apt/sources.list.bak /etc/apt/sources.list
  20. # Setup Docker
  21. sudo usermod -aG docker $(whoami)
  22. sudo systemctl enable docker.service
  23. echo "Packages were installed. We need to reboot!"