Skip to content

Commit a4aa5fb

Browse files
committed
docs: readme
1 parent c861bf5 commit a4aa5fb

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ build/*
66
ssh_data
77
__debug_bin
88
.bin
9+
.env

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ access.
2121
For example, have you ever wished you could use `docker push` and `docker pull`
2222
using just an SSH keypair? Well now it's possible.
2323

24+
Run our [cmd/docker](./cmd/docker/) example to see it in action!
25+
2426
We built this library to support [imgs.sh](https://pico.sh/imgs): a private
2527
docker registry leveraging SSH tunnels.
2628

cmd/docker/main.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ func serveMux(ctx ssh.Context) http.Handler {
3636
router := http.NewServeMux()
3737
slug := ctx.User()
3838

39+
registryUrl := os.Getenv("REGISTRY_URL")
40+
if registryUrl == "" {
41+
registryUrl = "registry:5000"
42+
}
43+
3944
proxy := httputil.NewSingleHostReverseProxy(&url.URL{
4045
Scheme: "http",
41-
Host: "registry:5000",
46+
Host: registryUrl,
4247
})
4348

4449
oldDirector := proxy.Director

0 commit comments

Comments
 (0)