Created
October 31, 2021 13:58
-
-
Save vfarcic/0a3e9e48dd1de03146339dd17d16bc20 to your computer and use it in GitHub Desktop.
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 characters
# Referenced videos: | |
# How to run local multi-node Kubernetes clusters using kind: https://youtu.be/C0v5gJSWuSo | |
# K3d - How to run Kubernetes cluster locally using Rancher K3s: https://youtu.be/mCesuGk-Fks | |
# Should We Replace Docker Desktop With Rancher Desktop?: https://youtu.be/bYVfCp9dRTE | |
# What Do Developers Really Need (And How Can Ops Help)?: https://youtu.be/gxx8EM08ihs | |
######### | |
# Setup # | |
######### | |
git clone https://github.com/vfarcic/rancher-nerdctl-demo | |
cd rancher-nerdctl-demo | |
# Replace `[...]` with your Docker Hub user | |
export DH_USER=[...] | |
# Replace `[...]` with your Docker Hub password | |
export DH_PASS=[...] | |
###################### | |
# Installing nerdctl # | |
###################### | |
# Start Rancher Desktop | |
# Make sure that `nerdctl` is selected | |
nerdctl help | |
alias docker=nerdctl | |
# That should be added to `~/.bashrc` or `~/.zshrc` | |
docker help | |
################################### | |
# Running Containers With nerdctl # | |
################################### | |
docker container ls | |
docker container run --rm -it \ | |
alpine echo "Is it working?" | |
############################### | |
# Docker Compose With nerdctl # | |
############################### | |
docker compose up --detach | |
docker container ls | |
docker compose down | |
################################# | |
# Container Images With nerdctl # | |
################################# | |
docker image build \ | |
--tag $DH_USER/devops-toolkit \ | |
. | |
docker login \ | |
--username $DH_USER \ | |
--password $DH_PASS | |
docker image push $DH_USER/devops-toolkit | |
docker image tag \ | |
$DH_USER/devops-toolkit \ | |
$DH_USER/devops-toolkit:0.0.1 | |
docker image ls | |
#################### | |
# Missing features # | |
#################### | |
docker system prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment