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 git
ssh -T -p 2201 git@localhost
git clone git@localhost:initdc/Hello_World.git
change buildx DRIVER
from docker
to [ docker-container
or kubernetes
]
docker buildx create --name mycontext1 --driver docker-container --use --bootstrap
# or
docker buildx create --name mycontext1 --driver kubernetes --use --bootstrap
refs:
-
https://salesjobinfo.com/multi-arch-container-images-for-docker-and-kubernetes/
-
https://github.com/docker/buildx/blob/master/docs/reference/buildx_create.md
-
local
docker buildx build -t caddy-l4:amd64 . --load
docker buildx build --platform linux/arm64 -t caddy-l4:arm64 . --load
-t
for local tag:name:arch
-
for pushing
docker buildx build --platform linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 -t initdc/caddy-l4:v$(TZ=Asia/Shanghai date +%Y.%m.%d) . --push
latest
->v$(TZ=Asia/Shanghai date +%Y.%m.%d)
replace
initdc
with your docker registry user name.check full list with
docker buildx ls
MPL 2.0