메뉴
HN
Hacker News 5일 전

웹 브라우저에서 실행되는 컨테이너 빌드

IMP
6/10
핵심 요약

웹 브라우저의 샌드박스 환경 내에서 클라이언트 측 코드만으로 컨테이너 이미지를 직접 빌드하고 내보낼 수 있는 연구용 프로토타입이 공개되었습니다. 이 실험은 컨테이너 스펙에 대한 깊은 이해를 바탕으로 Docker 빌드 등 기존 툴의 한계를 벗어나 맞춤형 도구를 개발할 수 있다는 가능성을 보여줍니다.

번역된 본문

완전히 브라우저 내에서 이루어지는 컨테이너 빌드 2026년 5월 24일

컨테이너(Container)는 참 매력적입니다. 생태계가 매우 개방적이어서 누구나 내부 구조를 탐색할 수 있습니다. 스펙(Specification)을 이해하고 나면 맞춤형 도구를 만들어낼 수 있고, 심지어 예상치 못한 활용 사례까지 발견하게 될지도 모릅니다 1.

'예상치 못한 활용 사례'라면, 오늘 여러분께 데모 하나를 공유하고자 합니다. 오직 클라이언트 측 코드에만 의존하여 브라우저 내에서 직접 컨테이너를 빌드하는 웹 애플리케이션입니다.

직접 체험해 보세요 백문이 불여일견, 데모 페이지로 이동해 직접 컨테이너를 빌드해 보시겠어요? 다음과 같은 작업이 가능합니다:

  • 베이스 이미지 선택
  • 컨테이너 시작 시 실행할 셸 스크립트(Shell script) 지정
  • 완성된 이미지를 tar 파일로 내보내기 (이후 Docker에 로드 가능)

중요: 이것은 연구용 프로토타입이므로 실무나 중요한 용도로 사용하지 마세요. 프로덕션 환경에 적합한 솔루션이 필요하시다면 저에게 연락해 주세요.

작동 원리 컨테이너 이미지는 결국 파일들의 집합일 뿐입니다 (자세한 분석은 이 글을 참조하세요). 우리는 브라우저를 벗어나지 않고도 이미지를 다운로드하고, 압축을 풀고, 조작하고, 다시 패키징할 수 있습니다! 브라우저의 샌드박스(Sandbox) 내부에서 레이어(Layer)를 빌드할 수만 있다면 그 활용 가능성은 무궁무진합니다.

사실 더 할 말이 별로 없네요. 데모를 사용해 보시면 각 빌드 단계를 설명하는 빌드 로그를 확인하실 수 있습니다. 또한, 복잡한 내부 구조가 궁금하신 분들을 위해 빌더의 소스 코드를 여기에 공유해 두었습니다.

브라우저를 넘어서 솔직히 말하자면, 브라우저 내 컨테이너 빌드는 대부분의 경우 그저 일회성 꼼수(Gimmick)에 가깝습니다. 아마 그동안 이를 문서화한 사람이 없었던 이유도 이 때문일 것입니다. 하지만 이 실험은 재미있을 뿐만 아니라, 맞춤형 컨테이너 도구의 강력한 힘을 보여주는 좋은 사례입니다.

문제는... 맞춤형 도구를 개발하는 것은 재밌지만, 검증된 기존 방식을 따르는 것이 훨씬 실용적일 때가 많다는 점입니다. 그러다 보니 우리는 아예 맞춤형 도구를 만들 수 있다는 사실 자체를 잊어버리고, 때로는 docker build 등 기존 도구들의 한계에 순응하고 맙니다.

하지만 결과적으로 보면, 맞춤형 도구를 통해 얻는 이점이 너무나 크기에 그냥 지나칠 수 없는 경우가 종종 있습니다. 예를 들어, 제가 최근 진행한 컨설팅 프로젝트 중 하나에서는 크기가 수 GiB에 달하는 이미지의 생성 시간을 단 몇 초 단축시켰습니다! 직접 도구를 설계하면 아키텍처, 최적화 및 캐싱 전략을 온전히 제어할 수 있어 엄청난 속도 향상을 이뤄낼 수 있습니다.

따라서... 다음번에 여러분이 사용 중인 컨테이너 도구의 한계에 부딪힌다면, 우리에게 사실 다른 선택지도 있다는 것을 기억하세요. 컨테이너의 기본 원리를 이해한다면, docker build가 해결해 주지 못하는 문제들을 훌륭하게 해결해 주는 도구를 직접 만들 수 있습니다! 혹은, 여전히 표준 도구를 계속 사용하더라도 이번에는 어쩔 수 없이 사용하는 것이 아니라 스스로 선택해서 사용하게 될 것입니다.

관련 글 보기: Dockerfile 없이 컨테이너 빌드하기 및 S3를 컨테이너 레지스트리로 사용하기. ↩︎ #Containers

원문 보기
원문 보기 (영어)
Fully in-browser container builds 24 May, 2026 Containers are fun. The ecosystem is incredibly open, with the internals right there for anyone to explore. Once you wrap your head around the specifications , you unlock the power to build custom tools and may even discover unexpected use cases 1 . Speaking of “unexpected use cases”, today I have a demo to share: a web application that builds containers right in your browser, relying only on client-side code. Try it out Seeing is believing, so why don’t you head to the demo and build a container? You will be able to: Pick a base image Specify a shell script to run upon container startup Export the resulting image as a tar file, which you can then load into docker Important: this is a research prototype, don’t use it for anything serious. If you need something production-ready, let’s talk. How does it work? Container images are just sets of files (see this article for a dissection). We can download them, unpack them, manipulate them, and repack them, all without leaving the browser! The possibilities are endless, as long as you are able to build your layers inside the browser’s sandbox. There is little more to say, really. If you try out the demo, you will see build logs describing each build step. Also, the source code of the builder is available here , in case you are interested in the gory details. Beyond browsers Honestly, I think in-browser container builds are mostly a gimmick, which is probably why nobody has spent time documenting them before. The experiment is fun, though, and it serves to showcase the powers of custom container tooling. The thing is… while custom tools are fun to develop, it is often more practical to follow the well-trodden path . Hence, we forget that custom tools can be developed at all, and we sometimes resign ourselves to the limitations of docker build and friends. As it turns out, however, sometimes the wins unlocked by custom tools are too good to pass up. For example, in one of my recent consulting projects, we brought down image creation time to mere seconds, even for images that were multiple GiB in size! When you craft your own tools, you get to control the architecture, optimizations and caching strategies, leading to massive speedups. So… the next time you find yourself hitting the limits of your container tools, remember that we actually have a choice. If you learn container fundamentals, you can build tools that solve your problem better than docker build ever could! Or, if you prefer, you can stick to the standard tooling, this time by conscious choice rather than by necessity. See Building containers without Dockerfiles and Using S3 as a container registry .  ↩︎ #Containers