/podshell

PodShell is a small OCI compatibel container image for development and debug purposes

Primary LanguageDockerfile

podshell

Open in GitHub Codespaces

Simple and small container env for development and debug purposes.

By default, the container starts as a regular user, to play nice with potential Kubernetes admission policies. Therefor, the a set of most useful packages is already installed, while keeping an eye on the container image size. The package list is not exhaustive, but can be extended by using the binenv tool. Run binenv to install various packages, by running binenv update, binenv search and binenv install <pkg>.

Usage

Imperative and removed on exit:

kubectl run -it --rm --restart=Never --image=ghcr.io/mpepping/podshell:latest shell

Declarative:

kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
  labels:
    run: shell
  name: shell
spec:
  containers:
  - image: ghcr.io/mpepping/podshell:latest
    imagePullPolicy: Always
    name: shell
    command: ["sleep"]
    args: ["86400"]
EOF

As a Deployment:

kubectl create deployment shell --image=ghcr.io/mpepping/podshell:latest -- sleep infinit

Or in docker or podman:

docker run -ti --rm ghcr.io/mpepping/podshell:latest ||\
podman run -ti --rm ghcr.io/mpepping/podshell:latest

Building

Container Image

Run make or see the Makefile.

❯ make
help                           This help.
build                          Build the image
push                           Push the image
clean                          Remove the image
start                          Start the container
stop                           Stop the container
test                           Test the container build

Feedback

Open an issue or PR.