C.W.K.
Stream
Lesson 03 of 03 · published

다음은 — Dev Container, Wasm, 궤적

~12 min · production, future

Level 0Container 호기심
0 XP0/36 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

Dev Container — repo 가 자기 환경 처방

.devcontainer/devcontainer.json 이 VS Code (또는 GitHub Codespaces) 한테 dev 용 정확한 container 알려줌. 새 contributor clone, open, 분 단위에 동작 환경. README 의 '셋업 방법' 섹션이 config 파일이 됨.

WebAssembly Container

Docker 가 이제 WasmEdge, Wasmtime 같은 runtime 으로 Wasm module 돌림. Wasm container 는 10-100x 작고 거의 즉시 시작. 수정 안 한 Linux binary 못 돌림 — Wasm 으로 컴파일된 코드 필요 — 근데 serverless 와 edge 워크로드엔 진짜 변화.

Wasm 이 풀 앱 stack 에서 Linux container 대체 X. 시작 지연시간 과 image 크기가 병목인 데서 보완.

Code

devcontainer.json — 미니멀·json
{
  "name": "Python 3.12 Dev",
  "image": "mcr.microsoft.com/devcontainers/python:3.12",
  "features": {
    "ghcr.io/devcontainers/features/github-cli:1": {},
    "ghcr.io/devcontainers/features/docker-in-docker:2": {}
  },
  "forwardPorts": [8000],
  "postCreateCommand": "pip install -r requirements.txt",
  "customizations": {
    "vscode": {
      "extensions": ["ms-python.python", "charliermarsh.ruff"]
    }
  },
  "remoteUser": "vscode"
}

External links

Exercise

본인 진짜 프로젝트에 .devcontainer/devcontainer.json 추가. Dev Containers 확장 깔린 VS Code 에서 프로젝트 열고 동작 dev 환경에 boot 되는 거 확인. Config commit 하고 README 에 — 어떻게 쓰는지 — 두 문장.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.