cloudflare / cloudflared

Cloudflare Tunnel client (formerly Argo Tunnel)
https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide
Apache License 2.0
9.37k stars 836 forks source link

Raspberry Pi cannot use docker #420

Open lostmaniac opened 3 years ago

lostmaniac commented 3 years ago

I hope the official can support the docker image of the Raspberry Pi.

sudarshan-reddy commented 3 years ago

Hi lostmaniac. What image are you looking for?

Kate222 commented 3 years ago

@sudarshan-reddy , I used 2012.8.2-arm64 and got error message: standard_init_linux.go:228: exec user process caused: exec format error. It does not support raspberry pi 4.

Could you please let me know whether there is another image that I can try? Thank you

sudarshan-reddy commented 3 years ago

Sorry to hear that. Can you try https://github.com/cloudflare/cloudflared/releases/download/2021.8.2/cloudflared-linux-arm64 ?

Kate222 commented 3 years ago

Sorry to hear that. Can you try https://github.com/cloudflare/cloudflared/releases/download/2021.8.2/cloudflared-linux-arm64 ? @sudarshan-reddy The docker image I used is 2012.8.2-amd64. I use Portainer. I normally just enter a docker image tag. I am not sure how to use this file yet but I will google. Many thanks

cmoore1776 commented 3 years ago

The docker image I used is 2012.8.2-amd64. I use Portainer. I normally just enter a docker image tag. I am not sure how to use this file yet but I will google. Many thanks

I build an arm64 cloudflared image you can try.

The tag is shamelesscookie/cloudflared-proxy-dns

Dockerfile is here for reference: https://github.com/shamelesscookie/cloudflared-proxy-dns

slix commented 3 years ago

Duplicate of #237 (Support ARMv6 on Docker)

Kate222 commented 3 years ago

The docker image I used is 2012.8.2-amd64. I use Portainer. I normally just enter a docker image tag. I am not sure how to use this file yet but I will google. Many thanks

I build an arm64 cloudflared image you can try.

The tag is shamelesscookie/cloudflared-proxy-dns

Dockerfile is here for reference: https://github.com/shamelesscookie/cloudflared-proxy-dns

@shamelesscookie Thank you so much for the image. I have received an error message. image

cmoore1776 commented 3 years ago

@shamelesscookie Thank you so much for the image. I have received an error message. image

Ah, I wasn't publishing armv7... but I am now!

If you pull the latest, it should be working

Kate222 commented 3 years ago

@shamelesscookie The container is up running fine now. Much appreciated.

Kate222 commented 3 years ago

After I use command "cloudflared tunnel login" in portainer, it has given me tunnel id and has message "Your free tunnel has started! Visit it: https://assurance-jazz-southern-mid.trycloudflare.com " in log file. It did not go to cloudflare account login as I hoped. I am not sure why.

Kate222 commented 3 years ago

I have used this docker image visibilityspots/cloudflared:lastest. It gives me a link to authenticate my tunnel and have a cert.pem.

leojonathanoh commented 3 years ago

this project should really add docker images for other archs.

leojonathanoh commented 3 years ago

i am revisiting this issue because adding docker image builds with docker buildx is relatively simple using github workflows. Users in general want to rely on a reliable brand when consuming any docker image and this repo is the best place to do it instead of leaving the maintenance to some third party image like https://github.com/crazy-max/docker-cloudflared. But perhaps this repo can reach out to https://github.com/crazy-max/docker-cloudflared.

From the docs it appears cloudflare isn't very serious about using cloudflared in a docker container, because the docs generally only describe using it as a binary on a host system / installing it as a service on the host system. I believe it is a matter of preference but I actually find it more elegant to run these things inside a docker container because of separation of concerns and for security considerations. But perhaps the culture at cloudflare is one which discourages the use of virtualization on the client side (the entire zero-trust browser based SSH instead of command line, browser brased VNC instead of VNC clients, the upcoming browser based RDP instead of RDP client) but that doesn't mean that virtualization should also be neglected on the server side (e.g. using cloudflared on the server is far more powerful than cloudflared on the client).

cloudflared is a very simple and flexible tool and can be deployed across any environment. So why aren't other arch images included yet? If using cloudflared should be as simple as running cloudflared tunnel run on any platform (after installing platform-specific package or downloading the binary), then it would be even simpler to run it with docker run -it cloudflare/cloudflared tunnel run (no need to install platform-specific package or download the binary).

marnow76 commented 2 years ago

I have a similar issue with installing this in docker on Firewalla (6 Core ARM Processor with 2GB RAM). It supposed to work according to their help document https://help.firewalla.com/hc/en-us/articles/360051625034-Guide-How-to-install-Pi-Hole-on-Gold-Purple-Beta-

but is not:

I am getting:

standard_init_linux.go:228: exec user process caused: exec format error standard_init_linux.go:228: exec user process caused: exec format error standard_init_linux.go:228: exec user process caused: exec format error

churchofnoise commented 2 years ago

@marnow76 Have a look at the comments on the firewalla page (last ones) - there are more of us running into this. Another user had figured it out and I asked to FW team to update the text on that page. In the mean time I am using another provider of a docker container that does work with ARM architecture.

@cloudflare, can you please add this?

adyanth commented 2 years ago

I would love to see multi-arch images for cloudflared. Would help a lot in multi-architecture clusters with ARM and x64 nodes being mixed.