Preliminaries:
-
Ubuntu 24.04 LTS (fresh install)
-
Docker - installed per instructions & running
-
Zrok - installed per instructions & running
What Works
blaze@base:$ zrok enable F##########M
⣯ the zrok environment was successfully enabled...
blaze@base:$ zrok reserve public http://localhost:9000
... your reserved share token is 'y##########d'
... reserved frontend endpoint: https://y##########d.share.zrok.io
blaze@base:$ zrok share reserved y##########d
... sharing target: 'http://localhost:9000'
... using existing backend target: http://localhost:9000
That URL successfully tunnels into the running docker container (which happens to be running portainer - but it could very well be anything.)
It is my goal/preference/desire to use the zrok installed on the system. I'm trying to keep this as simple as possible. So at this point I am NOT interested in running zrok inside a container.
What Doesn't Work
Now I want the link to be semi-permanent. So I attempt to follow the instructions found at Docker Share. My complete docker compose file looks like this:
services:
portainer:
container_name: portainer
image: portainer/portainer-ce:lts
command: -H unix:///var/run/docker.sock
restart: unless-stopped
ports:
- 9000:9000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/blaze/portainer/data:/data
zrok:
image: openziti/zrok
restart: unless-stopped
user: "1000" #this is the UID for user blaze
volumes:
- ${HOME}/.zrok:/home/ziggy/.zrok
environment:
PFXLOG_NO_JSON: "true"
command: share reserved "y##########d" --headless --insecure
Have also tried user: ${UID} & 0 (as root) without success.
Have also tried with and without --headless --insecure.
What Also Doesn't Work
I've read through about a dozen posts, finding this one most interesting.
So I tried this to see if it would forward within the container:
blaze@base$ zrok reserve public http://portainer:9000
... your reserved share token is '4##########p'
... reserved frontend endpoint: https://4##########p.share.zrok.io
and then I had to change the composed file to this:
command: share reserved "4##########p" --headless --insecure
But no luck. I got this feeling I am missing an .env file someplace. But it doesn't say anything about it on the Getting Started With Docker page in the documents.
I can see both shares inside the API.
In most cases I simply get the zrok "not found" error. Some combinations (when I changed the user) resulted in my getting a 502 page.
Any help would be greatly appreciated.