docker registry
A private docker image registry using SSH
NOTICE: This is a premium pico+ service
Features #
- Private docker image registry
- Use SSH keys for authentication
docker push
anddocker pull
work exactly the same
How it works #
We leverage web tunnels to open a portal to our private image registry where you
can access it via localhost
. This is accomplished by our open source library
tunkit.
Example usage #
1ssh -L 1338:localhost:80 -N imgs.sh
2# separate terminal
3docker push localhost:1338/my-img:latest
4docker pull localhost:1338/my-img:latest
5# or use the docker API
6curl http://localhost:1338/v2/_catalog
SSH CLI #
We provide a CLI to manage your docker images.
1ssh imgs.sh help
2ssh imgs.sh ls
3ssh imgs.sh rm alpine --write
Always connected #
We use a docker compose file to always be connected inside our VMs, for example:
1services:
2 registry:
3 image: ghcr.io/picosh/ptun/autossh:latest
4 restart: unless-stopped
5 ports:
6 - 1338:1338
7 app:
8 image: localhost:1338/app
9 restart: unless-stopped
10 ports:
11 - "80:80"
GitHub action #
Need to use imgs.sh with CI/CD? Just create the SSH tunnel before trying to use
docker
. We provide a custom image based on autossh
to make this easier:
1name: build and push docker image
2
3on:
4 push:
5 branches: [main]
6
7jobs:
8 build:
9 runs-on: ubuntu-latest
10 # start ssh tunnel as a container service
11 services:
12 registry:
13 image: ghcr.io/picosh/ptun/autossh:latest
14 env:
15 PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
16 ports:
17 - 1338:1338
18 steps:
19 - name: Set up QEMU
20 uses: docker/setup-qemu-action@v3
21 - name: Set up Docker Buildx
22 uses: docker/setup-buildx-action@v3
23 with:
24 driver-opts: network=host
25 - name: Build and push
26 uses: docker/build-push-action@v5
27 with:
28 push: true
29 tags: localhost:5000/image:latest
Create an account using only your SSH key.
Get Started<< PREV
RSS-To-Email
NEXT >>
Custom domains