# 安装oh-my-zsh sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
相互访问网络应用
WSL 2 做了架构的巨大变更,使用了虚拟化技术,并仍在努力改进网络支持。由于 WSL 2 现在运行在虚拟机中,因此你从 Windows 访问 Linux 网络应用程序需要使用该 VM 的 IP 地址,反之亦然,你需要 Windows 主机的 IP 地址才能从 Linux 中访问 Windows 网络应用程序。 WSL 2 的目标是尽可能使用 localhost 访问网络应用程序!可以在文档中找到有关如何执行此操作的完整详细信息和步骤。
services: reverse-proxy: # The official v2.0 Traefik docker image image:traefik:v2.0 # Enables the web UI and tells Traefik to listen to docker command:--api.insecure=true--providers.docker.endpoint=tcp://127.0.0.1:2377--providers.docker.swarmMode=true ports: # The HTTP port -"80:80" # The Web UI (enabled by --api.insecure=true) -"8080:8080" volumes: # So that Traefik can listen to the Docker events -/var/run/docker.sock:/var/run/docker.sock
services: whoami: # A container that exposes an API to show its IP address image:containous/whoami deploy: replicas:3 labels: -"traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)" -"traefik.http.services.whoami.loadbalancer.server.port=80" -"traefik.http.services.whoami.loadbalancer.sticky=true" -"traefik.http.services.whoami.loadbalancer.sticky.cookie.name=foosession"