Created
October 10, 2021 19:44
-
-
Save vfarcic/7e6c45f0a5aa005d60fc2a6a4131d76a to your computer and use it in GitHub Desktop.
This file contains 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 characters
# Source: https://gist.github.com/d2f36b05bf959e5fc91497ea3f0dceb3 | |
########################################################## | |
# Should We Replace Docker Desktop With Rancher Desktop? # | |
# https://youtu.be/bYVfCp9dRTE # | |
########################################################## | |
# Referenced videos: | |
# - Free Docker Desktop Alternative For Mac And Windows: https://youtu.be/LGNEG-t96eE | |
# - K3d - How to run Kubernetes cluster locally using Rancher k3s: https://youtu.be/mCesuGk-Fks | |
# - Kaniko - Building Container Images In Kubernetes Without Docker: https://youtu.be/EgwVQN6GNJg | |
######### | |
# Setup # | |
######### | |
git clone https://github.com/vfarcic/devops-toolkit | |
cd devops-toolkit | |
####################### | |
# Rancher Desktop GUI # | |
####################### | |
# Install Rancher Desktop from https://github.com/rancher-sandbox/rancher-desktop/releases | |
# Open the app | |
# https://github.com/rancher-sandbox/rancher-desktop/issues/562 | |
# Kubernetes Settings > Supporting Utilities > select kim | |
############################ | |
# Local Kubernetes Cluster # | |
############################ | |
kubectl get nodes | |
kubectl get pods -A | |
############################# | |
# Replacing Docker With kim # | |
############################# | |
kim --help | |
kim image --help | |
alias docker=kim | |
# That should be added to `~/.bashrc` or `~/.zshrc` | |
docker container ls | |
docker container run --rm -t \ | |
alpine echo "Is it working?" | |
docker compose up --detach | |
# Replace `[...]` with your DockerHub user | |
export DH_USER=[...] | |
docker image build \ | |
--tag $DH_USER/devops-toolkit \ | |
. | |
docker image list | |
docker image build \ | |
--tag $DH_USER/devops-toolkit:latest \ | |
. | |
docker image list | |
######################################## | |
# Tagging And Pushing Container Images # | |
######################################## | |
docker image tag \ | |
$DH_USER/devops-toolkit:latest \ | |
$DH_USER/devops-toolkit:0.0.1 | |
docker image list | |
docker image push \ | |
$DH_USER/devops-toolkit:0.0.1 | |
# If it failed due to authentication issues, execute the `docker builder login` command and try again. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment