Layer 4 proxy server, Powered by Caddy.
Solving git@github.com network problem in this case.
![DANGER] Private key will send to mirror server, deploy server by yourself
docker run --name caddy-l4 -dp 2201:2201 initdc/caddy-l4:latest
You need set private key and port for ssh
# ~/.ssh/config Host github.com Hostname github.com IdentityFile ~/.ssh/id_ed25519_github User git Host localhost Hostname localhost IdentityFile ~/.ssh/id_ed25519_github Port 2201 User git # ssh.example.com Host ssh.example.com Hostname ssh.example.com IdentityFile ~/.ssh/id_ed25519_github User gitssh -T -p 2201 git@localhost
git clone git@localhost:initdc/Hello_World.git
change buildx DRIVER from docker to docker-container
docker buildx create --name mybuilder --driver-opt network=host --use docker buildx inspect --bootstrapref: https://salesjobinfo.com/multi-arch-container-images-for-docker-and-kubernetes/
-
local
docker buildx build -t caddy-l4:amd64 . --loaddocker buildx build --platform linux/arm64 -t caddy-l4:arm64 . --load-tfor local tag:name:arch -
for pushing
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t initdc/caddy-l4:v$(TZ=Asia/Shanghai date +%Y.%m.%d) . --pushlatest->v$(TZ=Asia/Shanghai date +%Y.%m.%d)replace
initdcwith your docker registry user name.exclude
linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v6for my own usage, add more by yourself.check full list with
docker buildx ls
MPL 2.0