Created
July 12, 2025 09:21
-
-
Save zdk/575fbb36a913e20f21f6c10e8ec26734 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❯ cat Dockerfile | |
| FROM docker.io/python:alpine | |
| WORKDIR /content | |
| RUN apk add curl | |
| RUN curl -fsSL https://github.com/norouter/norouter/releases/latest/download/norouter-$(uname -s)-$(uname -m).tgz | tar xzvC /usr/local/bin | |
| RUN echo '<!DOCTYPE html><html><head><title>Hello</title></head><body><h1>Hello, world!</h1></body></html>' > index.html | |
| CMD ["python3", "-m", "http.server", "80", "--bind", "0.0.0.0"] | |
| ❯ cat norouter.yaml | |
| hosts: | |
| # host0 is the localhost | |
| host0: | |
| vip: "127.0.42.100" | |
| host1: | |
| cmd: "container exec -i my-web-server-1 /usr/local/bin/norouter" | |
| vip: "127.0.42.101" | |
| ports: ["8080:127.0.0.1:80"] | |
| writeEtcHosts: true | |
| host2: | |
| cmd: "container exec -i my-web-server-2 /usr/local/bin/norouter" | |
| vip: "127.0.42.102" | |
| ports: ["8080:127.0.0.1:80"] | |
| writeEtcHosts: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment