Last active
April 15, 2025 13:27
-
-
Save gruberdev/6618a3ad5010ceb335b4d728cc23fe10 to your computer and use it in GitHub Desktop.
Revisions
-
gruberdev revised this gist
Apr 15, 2025 . 1 changed file with 9 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,12 +6,13 @@ echo "Installing git, docker.io, and make..." sudo apt-get install -y git docker.io make echo "Starting and enabling Docker service..." sudo systemctl start docker sudo systemctl enable docker && \ echo "Adding current user ($USER) to the docker group..." && \ sudo usermod -aG docker $USER && \ newgrp docker && \ git clone https://github.com/gruberdev/local-gitops.git && \ cd local-gitops && \ make task tools task dns task -
gruberdev revised this gist
Apr 15, 2025 . 1 changed file with 4 additions and 28 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,41 +1,17 @@ #!/bin/bash set -e sudo apt-get update -y echo "Installing git, docker.io, and make..." sudo apt-get install -y git docker.io make echo "Starting and enabling Docker service..." sudo systemctl start docker sudo systemctl enable docker echo "Adding current user ($USER) to the docker group..." sudo usermod -aG docker $USER newgrp docker git clone https://github.com/gruberdev/local-gitops.git cd local-gitops make -
gruberdev created this gist
Apr 15, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ #!/bin/bash # Exit immediately if a command exits with a non-zero status. set -e # --- Update Package List --- # Refresh the list of available packages from the repositories. echo "Updating apt package list..." sudo apt-get update -y # --- Install Required Packages --- # Install Git (version control), Docker (containerization), and Make (build automation). echo "Installing git, docker.io, and make..." sudo apt-get install -y git docker.io make # --- Initialize and Enable Docker --- # Ensure the Docker service is running and set it to start automatically on boot. echo "Starting and enabling Docker service..." sudo systemctl start docker sudo systemctl enable docker # --- Add User to Docker Group --- # Add the current user ($USER) to the 'docker' group. # This allows running docker commands without needing sudo. # IMPORTANT: You need to log out and log back in for this change to take effect! echo "Adding current user ($USER) to the docker group..." sudo usermod -aG docker $USER # --- Completion Message --- echo "-----------------------------------------------------" echo "Initialization complete!" echo "Packages installed: git, docker.io, make." echo "Docker service started and enabled." echo "User $USER added to the docker group." echo "IMPORTANT: Please log out and log back in for group changes to take effect." echo "-----------------------------------------------------" # You can verify docker works without sudo after logging back in by running: # docker run hello-world exit 0