Erisa/cloudflared-docker

Can't access shell

niallobr opened this issue · 2 comments

Hi there,

Maybe a silly question... I can't find a way to enter a my containers to run commands. Is there no shell inside the container?

So far I've tried

docker exec -it cloudflared-mycontainer /bin/sh
docker exec -it cloudflared-mycontainer /bin/ash
docker exec -it cloudflared-mycontainer /bin/bash

If I delete these containers I don't think the actual Cloudflare Tunnel is removed just the container, so what I'm trying to do is run commands like this

cloudflared tunnel list
cloudflared tunnel delete -f <NAME>

Is there some other way I should be doing it? Should I be running these commands and managing the tunnels from my local shell?

Erisa commented

Hi, since these containers are built FROM scratch, all they contain is the cloudflared binary and nothing else.

I usually run these commands from my local shell, but if you want to run onetime commands you can do something like:

docker exec cloudflared-mycontainer /cloudflared tunnel list

Note that the documentation in the README is a little outdated when it comes to named tunnels. While I have used them successfully myself, there's a lot that I haven't been able to put into words for the README yet.

Oh awesome. Thank you for the help :)