# Cloudflare Workers는 PDF를 만들 수 없다: LaTeX 컴파일러를 컨테이너로 옮긴 이유

Original title: Shipping a LaTeX Compiler Behind an Edge App

> Hacker News story 50149609 · language: ko · submitted 2026-10-19
> Web version: https://zeli.app/ko/story/50149609
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 13 · by [brgv](<https://news.ycombinator.com/user?id=brgv>) · 💬 7
[original](<https://bhargav.dev/writing/shipping-a-latex-compiler-behind-an-edge-app>) · [HN discussion](<https://news.ycombinator.com/item?id=50149609>)

## Summary

Cloudflare Workers는 V8 isolate라 네이티브 TeX 엔진을 실행할 수 없어, LaTeX 컴파일을 별도 컨테이너 서비스로 분리했다. Tectonic은 필요한 패키지만 받아오고 shell escape가 기본 꺼져 있어 안전하다. 하지만 문서가 /proc/1/environ을 읽어 서비스 토큰을 로그로 출력할 수 있다는 구멍을 발견해, 환경 변수를 초기화하고 토큰을 stdin으로 전달하도록 고쳤다. Dockerfile 한 줄이 3초 컴파일을 60초 타임아웃으로 만든 이야기까지 담았다.

## Key quote

> 컴파일러가 읽을 수 있는 것은 문서도 읽을 수 있다. 그래서 컨테이너 안에는 읽을 가치가 있는 것을 두면 안 된다.

---

## Cite

- Page: https://zeli.app/ko/story/50149609
- Date: 2026-10-19
- Source: bhargav.dev (https://bhargav.dev/writing/shipping-a-latex-compiler-behind-an-edge-app)
- Hacker News: https://news.ycombinator.com/item?id=50149609

## Other languages

- en: https://zeli.app/story/50149609 · markdown: https://zeli.app/story/50149609.md
- zh: https://zeli.app/zh/story/50149609 · markdown: https://zeli.app/zh/story/50149609.md
- ja: https://zeli.app/ja/story/50149609 · markdown: https://zeli.app/ja/story/50149609.md
- de: https://zeli.app/de/story/50149609 · markdown: https://zeli.app/de/story/50149609.md
- es: https://zeli.app/es/story/50149609 · markdown: https://zeli.app/es/story/50149609.md
- ru: https://zeli.app/ru/story/50149609 · markdown: https://zeli.app/ru/story/50149609.md
