plan to use podman or podman desktop in my development

125 阅读1分钟

i have a plan to use podman or podman desktop in my development.

choose docker or podman ?

choose docker or podman

install podman

installation

installing-podman-with-podman-desktop

install podman-desktop

nstalling-podman-desktop-with-scoop

migrating-from-docker

importing-saved-containers

docker export <your_container> > <your_container_archive>.tar
podman import <your_container_archive>.tar

using-the-docker_host-environment-variable

# win:
# loc=podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}'
# linux:
loc=podman info --format '{{.Host.RemoteSocket.Path}}'

export DOCKER_HOST=$loc

emulating-docker-cli-with-podman

# ADD FILE /etc/containers/nodocker
touch /etc/containers/nodocker

# ADD FILE /usr/local/bin/docker
cat > /usr/local/bin/docker <<EOF
#!/usr/bin/sh
[ -e /etc/containers/nodocker ] || \
echo "Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg." >&2
exec podman "$@"
EOF

# ADD X RIGHT
chmod +x /usr/local/bin/docker


# check:
# docker run -it docker.io/hello-world

verifying-your-tools-are-using-podman

curl --unix-socket npipe:////./pipe/docker_engine "http:/v1.41/containers/json?all=true"

Migrating containers to Kubernetes

configuring-access-to-a-kubernetes-cluster

# Register your <my_kubernetes> Kubernetes cluster
kubectl config set-cluster <my_kubernetes> --server=<my_kubernetes_url>

viewing-and-selecting-current-kubernete-context

deploying-a-container-to-kubernetes

deploying-a-pod-to-kubernetes

working with kind

Running Kubernetes on your workstation with Kind and Podman

installing-kind

configuring-podman-for-kind-on-windows

creating-a-kind-cluster

working-with-your-local-kind-cluster

deleting-your-kind-cluster

restarting-your-kind-cluster

building-an-image-and-testing-it-in-kind

pushing-an-image-to-kind


# insatll kind cli
# ...
kind get clusters

# Configuring Podman for Kind on Windows Subsystem for Linux (WSL)
podman machine stop
podman machine set --rootful
podman machine start

# creating-a-kind-cluster
# ...

# working-with-your-local-kind-cluster
# ...

# deleting-your-kind-cluster
# ...

# restarting-your-kind-cluster
# ...

# building-an-image-and-testing-it-in-kind
# ...

# pushing-an-image-to-kind
# ...

window & wsl & vscode & podman

window & wsl & vscode & podman

window & vscode & podman-desktop

remote-container-development-vs-code-and-podman