Repository navigation
feat(sandbox): slim the sandbox image and give containers the host time zone - #173
Merged
Merged
Conversation
…me zone The Cloud SDK's apt install script compiles 254 MB of bytecode, a third of the SDK. Deleting it in the install layer costs a new container 0.2-0.5 s on the first run of a gcloud command family, after which Python has written back what it uses. Interactive editors and pagers, bash-completion, python3-venv, and the transitional apt-transport-https and lsb-release packages are unused by mikan and agents; gnupg only dearmored the Google key, which apt reads armored. The image is 389 MB smaller. ENV TZ=Asia/Taipei fixed one deployment's zone in a public image. The image is UTC, and the provisioner passes the host's IANA zone to each container, as the system prompt already assumes for events.
Deploying mikan with
|
| Latest commit: |
d0d61b5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2dc4e3a2.mikan-1wv.pages.dev |
| Branch Preview URL: | https://feat-slim-sandbox-image.mikan-1wv.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
為什麼要改
sandbox image 約 2.9 GB,其中有不少 mikan 和 agent 都用不到的東西。另外 Dockerfile 寫死了
TZ=Asia/Taipei,這是公開的 image,對其他使用者不對。研究紀錄:docs/research/sandbox-image-slim-2026-10.md。改了什麼
.pyc)vim、nano、less、bash-completionpython3-venvapt-transport-https、lsb-releasegnupg.ascENV TZ=Asia/Taipei--env TZ=…),和 system prompt 裡「events 預設用主機時區」一致tzdataTZ要依賴它,不靠其他套件順帶裝進來TZ時會跟著改刻意保留:
python3-pip。它負責在有人執行pip install時,提示改用uv run --with,smoke 測試也有檢查這點。gsutil、bq 也保留,拿掉會讓 agent 或 skill 呼叫的指令失效。結果(arm64,同一天、同一個 base 建置)
gcloud version(新 container 第一次/之後)gcloud storage ls --help(第一次/之後)scripts/smoke-sandbox-image.shoci:,nerdctl)TZ是主機時區代價:每個新 container 第一次執行某一類 gcloud 指令時,會多 0.2 到 0.5 秒,之後就和原本一樣快。
驗證
Release note
Asia/Taipei:mikan 會把主機的時區傳給 container,部署在台北時行為不變。