Skip to content

Commit 1a1b368

Browse files
committed
docs: readme
1 parent a4aa5fb commit 1a1b368

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@ using just an SSH keypair? Well now it's possible.
2323

2424
Run our [cmd/docker](./cmd/docker/) example to see it in action!
2525

26+
```bash
27+
# start a registry
28+
docker run -d -p 5000:5000 --restart always --name registry registry:2
29+
# run the SSH app
30+
REGISTRY_URL="localhost:5000" go run ./cmd/docker
31+
# connect to SSH app
32+
ssh -L 1338:localhost:80 \
33+
-p 2222 \
34+
-o UserKnownHostsFile=/dev/null \
35+
-o StrictHostKeyChecking=no \
36+
-N \
37+
localhost
38+
# tag image
39+
docker tag alpine localhost:1338/alpine
40+
# push image
41+
docker push localhost:1338/alpine:latest
42+
# pull image
43+
docker pull localhost:1338/alpine:latest
44+
```
45+
2646
We built this library to support [imgs.sh](https://pico.sh/imgs): a private
2747
docker registry leveraging SSH tunnels.
2848

0 commit comments

Comments
 (0)