Skip to content

Commit

Permalink
Merge pull request #1 from mahdihasnat/docker-kubernates
Browse files Browse the repository at this point in the history
Added docker, minikube, kubectl
  • Loading branch information
mahdihasnat authored Jan 19, 2024
2 parents bad2343 + ee7b6d8 commit 4c5ff4e
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -eux

echo "\nInstalling Docker ...\n"
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor --batch --yes -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

sudo docker run hello-world
21 changes: 21 additions & 0 deletions scripts/kubectl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -eux

echo "\nInstalling Kubectl ...\n"

sudo apt-get update -y
sudo apt-get install -y apt-transport-https ca-certificates curl

# If the folder `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below.
sudo mkdir -p -m 755 /etc/apt/keyrings
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor --batch --yes -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg

# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.list
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list

sudo apt-get update -y
sudo apt-get install -y kubectl

kubectl --help
kubectl version --client
8 changes: 8 additions & 0 deletions scripts/minikube.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -eux

echo "\nInstalling Minikube ...\n"
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb
rm minikube_latest_amd64.deb
3 changes: 3 additions & 0 deletions scripts/run_order.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ sublime.sh
vim.sh
emacs.sh
geany.sh
docker.sh
minikube.sh
kubectl.sh
dist_upgrade.sh
copy_dots.sh
add_users.sh
Expand Down

0 comments on commit 4c5ff4e

Please sign in to comment.