Erisa / cloudflared-docker

Simple Alpine-built scratch-runtime Dockerfile for cloudflared, with support for multiple architectures.
https://hub.docker.com/r/erisamoe/cloudflared
Other
158 stars 22 forks source link

Can't access shell #1

Closed niallobr closed 3 years ago

niallobr commented 3 years ago

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 3 years ago

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.

niallobr commented 3 years ago

Oh awesome. Thank you for the help :)