cloudflared
cloudflared copied to clipboard
feat(docker): build docker images with buildkit, add actions
hello, I add docker build workflow for cloudflared. I am learning buildx near time, and I feel good.
It may also helpful in your bin distro.
Edit docker tags
, actions user
token
by your own.
I found a problem, user can't run docker with -it
, because image FROM scratch
but it's useful for cross-compiling.
It may need two kind Dockerfile
check more usage from:
- https://github.com/initdc/ssh-proxy-by-caddy-l4
- https://hub.docker.com/r/initdc/cloudflared
It would be really great if this PR was merged. Is anything blocking it?
@initdc can you resolve conflicts, +1 for arm platform?
@initdc can you resolve conflicts, +1 for arm platform?
I am not sue keep which part, do we need these ARG
for building bin files?
@sudarshan-reddy pinging you since you are assigned to the related issue #628. This PR releases the container as a Github actions workflow but I haven't seen anything regarding how you folks release the containers right now. The only thing I have seen is https://github.com/cloudflare/cloudflared/blob/135c8e6d13663d2aa2d3c9169cde0cfc1e6e2062/Makefile#L131-L133
If you folks are using some internal tooling to run make container
somehow then that needs to be adapted. Else, instead of creating an action, this PR can be modified to change the Makefile
itself so that it runs docker buildx
and not docker build
(example is in https://github.com/SayakMukhopadhyay/cloudflared-docker-multiarch/tree/docker-mp).
As seen in the linked issue, many people have started using their own images, including me but this leads to increased fragmentation and possible security holes. Since this PR is currently blocked due to a conflict, it would be great if someone from the cloudflare team would shed some light as to how to get this PR merged, as is or with some changes.
I apologize for the ping in advance @usma0118 , but is there anything blocking this PR from being merged. Would you prefer a fresh PR on this, in which case I would be willing to provide one. Also, please do read my previous comment as I would like some clarification regarding what CI approach the maintainers would prefer.
I apologize for the stagnation in checking this PR. This is great work. The delay is because I'm currently evaluating the maintainability of putting this build process in Cloudflare's internal CI vs on GH. I'll have more news soon!
I can confirm that I was able to use this PR to run a Cloudflared tunnel in Docker on my (arm64) Raspberry Pi. Great stuff - would love to see this merged!
Check the latest workflow. https://github.com/initdc/golang-project-workflow
@initdc Any particular reason why you are using ruby to build for multiple containers? Docker buildkit action should be able to do it by itself.
@initdc Any particular reason why you are using ruby to build for multiple containers? Docker buildkit action should be able to do it by itself.
Ruby is more easy to understand, easy to exec CMD compare with JS.
Who want use $1 $# $@
in 2022, moreover you need quote them. bash and makefile, bad ass.
docker buildx
just did one thing which combine multi arch images as one tag.
I apologize for the stagnation in checking this PR. This is great work. The delay is because I'm currently evaluating the maintainability of putting this build process in Cloudflare's internal CI vs on GH. I'll have more news soon!
Thanks for all the effort here. We finally deliberated on this and decided to keep this build on our internal CI. This is because we can take advantage of metrics and support from more teams to make sure we keep this flow maintained.
I'm closing this PR but this work was very instrumental in Cloudflare getting this image out. So thank you so much all of you for making this happen.
We now have an arm64 image on Dockerhub. Feel free to test/use it and report any bugs or suggestions.
I can confirm that the arm64 cloudflared image is working perfectly on my setup. Thanks a ton for this!