Cloudflared cli packaged in an alpine docker image.
1.5K
Cloudflared cli packaged in an alpine docker image.
Setup to run as non root. Uses dumb-init as entrypoint.
Tunnel auth
docker run --rm -it -v $(pwd)/.cloudflared/:/home/cloudflare/.cloudflared/ registry.gitlab.com/larry1123/cloudflared:latest cloudflared login
docker run --rm -it -v $(pwd)/.cloudflared/:/home/cloudflare/.cloudflared/ registry.gitlab.com/larry1123/cloudflared:latest cloudflared tunnel create name
docker run --rm -it -v $(pwd)/.cloudflared/<UUID>.json:/home/cloudflare/.cloudflared/<UUID>.json registry.gitlab.com/larry1123/cloudflared:latest cloudflared tunnel run --url=hello_world <UUID>
FROM registry.gitlab.com/larry1123/cloudflared
ARG UUID
ENV UUID ${UUID}
COPY .cloudflared/${UUID}.json /home/cloudflare/.cloudflared/
CMD ["cloudflared", "tunnel", "run", "--url=hello_world", "${UUID}"]
Classic
docker run --rm -it -v $(pwd)/.cloudflared/:/home/cloudflare/.cloudflared/ registry.gitlab.com/larry1123/cloudflared:latest cloudflared login
docker run --rm -it -v $(pwd)/.cloudflared/:/home/cloudflare/.cloudflared/ registry.gitlab.com/larry1123/cloudflared:latest --hostname subdomain.example.com --url=hello_world
docker run --rm -it registry.gitlab.com/larry1123/cloudflared:latest cloudflared tunnel --url=hello_world
Notes:
--restart unless-stopped.--network host to use localhost ie. --url=http://localhost:8080--link container or --network containerCGroup is also useful for isolation.Docker with multi process init example
FROM YourAppImage:alpine
COPY --from=registry.gitlab.com/larry1123/cloudflared:latest /usr/local/bin/cloudflared /usr/local/bin/cloudflared
### have unit files for both app and cloudfalred
CMD ["/lib/systemd/systemd"]
The project's home is on gitlab.
Issues and merge request should be made there.
This project is hosted on docker hub.
This project's offical images are registry.gitlab.com/larry1123/cloudflared docker hub is manually updated.
This project is Licensed under the Apache License, Version 2.0. Artifacts of scripts provided within this repo may have their own licenses.
Content type
Image
Digest
Size
17.9 MB
Last updated
over 4 years ago
docker pull larry1123/cloudflared