This script automates the installation of Docker and Docker Compose on an Ubuntu system. It also sets up a user with Docker permissions and configures SSH for GitHub access.
To use this script, you need to provide your GitHub email and the password for the dockeruser account as parameters.
- Ubuntu operating system
- Administrative privileges (sudo access)
-
Clone the repository or download the script.
-
Make the script executable:
chmod +x docker-setup-ubuntu.sh
-
Run the script with your GitHub email and desired password for
dockeruser:sudo ./docker-setup-ubuntu.sh your_github_email@example.com your_dockeruser_password
- Installs Docker and Docker Compose
- Creates a new user
dockeruserwith specified password - Adds
dockeruserto the Docker group - Generates an SSH key for GitHub and displays the public key for easy addition to your GitHub account
- After running the script, remember to add the displayed SSH public key to your GitHub account under SSH and GPG keys.
- Verify Docker installation by running
docker --versionanddocker-compose --version.
This project is licensed under the MIT License - see the LICENSE file for details.