Container Cheat Sheet

Git

Add Submodule

git submodule add <repo_url> <target_dir>

Update Submodules Recursively

git submodule update --recursive --remote

Branching

Create one and move to it

git checkout -b <branch name>

Docker

Launch shell on running container

docker exec -it <container name> /bin/bash

Launch temporary container and a shell on it

docker run --rm -it image:tag /bin/bash

Kubernetes

Get a shell on a running container

kubectl exec -it <containerId> -- /bin/bash