Skip to content

feat(base): install cloudflared from Cloudflare apt repository - #11

Merged
amondnet merged 7 commits into
mainfrom
feat/10-install-cloudflared
Oct 30, 2026
Merged

amondnet merged 7 commits into
mainfrom
feat/10-install-cloudflared

Conversation

@seon-yunjae

Copy link
Copy Markdown
Contributor

요약

베이스 이미지에 cloudflared CLI를 설치한다. pkg.cloudflare.com에 안내된 Cloudflare 공식 apt 저장소를 쓰므로 apt-get upgrade로 갱신할 수 있다.

변경 내용

  • images/base/scripts/install-cloudflared.sh(새 파일, root): 서명 키를 /usr/share/keyrings/cloudflare-public-v2.gpg에 받고, deb [signed-by=...] https://pkg.cloudflare.com/cloudflared any main을 등록한 뒤 cloudflared를 설치하고 apt 캐시를 정리한다.
  • images/base/Dockerfile: root 단계에서 mise 다음, Docker 이전에 위 스크립트를 실행한다. 기존과 같이 /tmp에 복사하고 실행 후 삭제한다.
  • CLAUDE.md, images/CLAUDE.md, README.md에 cloudflared 항목을 추가했다.

범위

바이너리 설치만 다룬다. 터널, 서비스, 인증 정보, systemd 유닛은 설정하지 않는다. 다른 도구와 coder 사용자 단계는 바꾸지 않았다.

트레이드오프

릴리스 .deb를 직접 받는 대신 apt 저장소를 택했다. 이슈가 가리킨 문서가 apt 저장소이고, gh·mise·docker 설치 방식과 같다. 버전은 고정하지 않는다.

영향 범위

이미지 크기가 약 30–40MB 늘어난다. any 스위트라 amd64·arm64 모두 패키지가 있다.

검증

  • cloudflare-public-v2.gpg로 cloudflared/dists/any/InRelease를 gpgv 검증: Good signature from "CloudFlare Software Packaging 2025". 현재 문서의 cloudflare-main.gpg와 바이트 단위로 같다.
  • bash -n images/base/scripts/install-cloudflared.sh 통과.
  • 샌드박스에 Docker가 없어 로컬 이미지 빌드는 하지 않았다. CI 이미지 빌드로 확인한다.
  • 자체 리뷰(fresh-context): 발견 사항 0건.

Closes #10

Asana Tasks

Add install-cloudflared.sh to the root phase, using the official
pkg.cloudflare.com apt repository (any suite, cloudflare-public-v2 key),
and document it in CLAUDE.md, images/CLAUDE.md and README.md.

Closes #10
@seon-yunjae

Copy link
Copy Markdown
Contributor Author

This pull request was opened by a factory run.
View run

@seon-yunjae
seon-yunjae marked this pull request as ready for review October 29, 2026 18:26
@seon-yunjae seon-yunjae mentioned this pull request Oct 29, 2026
@seon-yunjae

Copy link
Copy Markdown
Contributor Author

/gemini review
@cubic-dev-ai review this PR

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the installation of cloudflared (Cloudflare Tunnel client) to the Coder workspace base image, updating the Dockerfile, adding an installation script, and updating the documentation. The review feedback suggests two improvements to the install-cloudflared.sh script: first, using curl -o instead of piping to tee to ensure the script fails immediately if the download fails; second, using standard redirection (>) instead of tee for writing the apt source list file, as the script already runs with root privileges.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

본 풀 리퀘스트는 Coder 워크스페이스 베이스 이미지에 Cloudflare 터널 클라이언트인 cloudflared 설치 과정을 추가합니다. 이를 위해 공식 apt 저장소에서 패키지를 설치하는 install-cloudflared.sh 스크립트가 새로 도입되었으며, Dockerfile 및 관련 문서들이 업데이트되었습니다. 리뷰어는 설치 스크립트의 안정성과 단순화를 위해 set -euo pipefail 설정 적용, 불필요한 tee 명령어 제거 및 curl -o와 리다이렉션(>) 사용을 제안했습니다.

@seon-yunjae

Copy link
Copy Markdown
Contributor Author

Review round closed: a review pass is working 5 thread(s).

@seon-yunjae

Copy link
Copy Markdown
Contributor Author

/gemini review
@cubic-dev-ai review this PR

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the installation of cloudflared (Cloudflare Tunnel client) into the Docker base image for Coder workspaces, updating the Dockerfile, adding an installation script, and updating the relevant documentation. The review feedback suggests aligning the GPG key filename with the official Cloudflare documentation, adding retry options to the curl command, optimizing the apt-get installation with --no-install-recommends to reduce image size, and ensuring the documentation remains consistent with these script updates.

Comment thread images/CLAUDE.md Resolved
@seon-yunjae

Copy link
Copy Markdown
Contributor Author

Review round closed: a review pass is working 3 thread(s).

@seon-yunjae

Copy link
Copy Markdown
Contributor Author

/gemini review
@cubic-dev-ai review this PR

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 풀 리퀘스트는 Coder 워크스페이스용 Docker 베이스 이미지에 Cloudflare Tunnel 클라이언트인 cloudflared 설치 단계를 추가합니다. 이를 위해 관련 문서들을 업데이트하고, install-cloudflared.sh 스크립트를 통해 공식 apt 리포지토리에서 패키지를 설치하도록 설정했습니다. 리뷰 피드백으로는 다운로드한 GPG 키 파일의 권한이 umask 설정에 의해 제한되어 _apt 사용자가 읽지 못해 빌드가 실패하는 문제를 방지하기 위해, GPG 키 파일에 명시적으로 0644 권한을 부여할 것을 권장했습니다.

@seon-yunjae

Copy link
Copy Markdown
Contributor Author

Review round closed: a review pass is working 1 thread(s).

Set the downloaded Cloudflare GPG keyring to 0644 so the unprivileged
_apt user can read it regardless of the build umask.
@seon-yunjae

Copy link
Copy Markdown
Contributor Author

/gemini review
@cubic-dev-ai review this PR

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates the installation of cloudflared (Cloudflare Tunnel client) into the Coder workspace Docker base image by adding a new installation script, updating the Dockerfile, and updating the documentation. The review feedback correctly highlights a medium-severity issue in the install-cloudflared.sh script where the downloaded ASCII-armored GPG key is saved directly without dearmoring, which could cause compatibility issues with some apt versions. The suggested fix to pipe the download through gpg --dearmor should be applied.

@seon-yunjae

Copy link
Copy Markdown
Contributor Author

Review round closed: a review pass is working 1 thread(s).

@seon-yunjae
seon-yunjae requested a review from amondnet October 29, 2026 21:19
@seon-yunjae

Copy link
Copy Markdown
Contributor Author

The factory's review pass pushed no new commit, so it is stopping at this head. Some review threads or failed checks may be unworked. @amondnet, this pull request is back with you for review.

@amondnet
amondnet merged commit ae299f2 into main Oct 30, 2026
2 checks passed
@amondnet
amondnet deleted the feat/10-install-cloudflared branch October 30, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cloudflared 설치

2 participants