Docker Desktop
在 macOS 上,……
Docker 虚拟机¶
docker run -it --rm --privileged --pid=host alpine:edge nsenter -t 1 -m -u -n -i sh
Docker Context¶
DOCKER_HOST¶
export DOCKER_HOST=ssh://ubuntu@$(multipass exec docker -- hostname -I | awk '{print $1}')
docker container ls
上下文剖析¶
单个 Docker CLI 可以具有多个上下文。
每个上下文都包含管理不同群集或节点所需的所有端点和安全信息。
Docker Context 使单个 Docker CLI 轻松管理多个 Kubernetes 集群以及多个单个 Docker 节点。
上下文是多个属性的组合。这些包括:
- 名称
- 端点配置
- TLS信息
- 编排
docker context ls
创建上下文¶
docker context create \
--default-stack-orchestrator=kubernetes \
--kubernetes config-file=$HOME/.kube/config \
--docker host=ssh://ubuntu@$(multipass exec docker -- hostname -I | awk '{print $1}') \
--description="Multipass Docker Instance" \
multipass-docker
使用上下文¶
docker context use multipass-docker
深入¶
容器¶
# 容器查看
ctr -n services.linuxkit tasks ls
ctr -n services.linuxkit tasks exec -t --exec-id 1207 docker sh
网桥¶
brctl show
问题¶
资源¶
- Overview of Docker Compose | Docker Documentation
- Docker Desktop Alternative: Comprehensive Overview Guide - Docker
- Docker Context
- Under the Hood: Demystifying Docker For Mac CE Edition
- Explore networking features
- How Docker Desktop Networking Works Under the Hood
- Docker Desktop for Mac Commands for Getting Into The Local Docker VM
最后更新: September 10, 2023