2025-04-18-Docker Desktop Setting General

2025-04-18-Docker Desktop Setting General

Docker Desktop Setting

General:

✔ Start Docker Desktop when you sign in to your computer
✔ Open Docker Dashboard when Docker Desktop starts

Choose theme for Docker Desktop
⚪ Light ⚪ Dark ✔Use system settings

Choose container terminal
✔ Integrated ⚪ System default
Determines which terminal is launched when opening the terminal from a container.

⚪ Enable Docker terminal

Must be signed in with an active subscription

⚪ Expose daemon on tcp://localhost:2375 without TLS
Exposing daemon on TCP without TLS helps legacy clients connect to the daemon. it also makes yourself vulnerable to remote code execution attacks. Use with caution.

✔ Use the WSL 2 based engine

⚪ Add the *.docker.internal names to the host’s /etc/hosts file(Requires password)
Lets you resolve *.docker.internal DNS names from both the host and your containers.

✔ Use containers image store enables native support for multi-platform image, attestations, Was, and more.

⚪ Send usage statistics
send error reports, system version and language as well as Docker Desktop lifecycle information(e.g.,starts, stops, resets).

⚪ Use Enhanced Container Isolation
Enhance security by preventing containers from breaching the Linux VM.
Muse be signed in with a Business subscription

✔ Show CLI Hints
Get CLI hints an tops when running Docker commands in the CLI.

✔ Enable Scout image analysis

⚪ Enable background Scout SBOM indexing
Automatically start Scout SBOM indexing of newly built or pulled images, and when an image is inspected.

好的 — 我把你貼的 General 頁面每一項逐條解釋、告訴你現狀(你貼的有打勾的)以及我的建議:

快速總結(先看這段)

  • 你目前勾的:開機啟動、啟動時開 Dashboard、整合終端為 Integrated、Use WSL 2、Use containers image store、Show CLI Hints、Enable Scout image analysis。這些對開發環境來說大致合理
  • 有兩個要非常小心不要開(除非你知道要做什麼):Expose daemon on tcp://localhost:2375 without TLS(關)與Enable background Scout SBOM indexing(視資源與隱私需求而定)。(Docker Documentation, Information Security Stack Exchange)

每項說明與建議(依你貼的順序)

✔ Start Docker Desktop when you sign in to your computer

  • 功能:開機自動啟動 Docker Desktop。
  • 建議:如果你常用 Docker 就 保留勾選;若想省資源,可不勾。

✔ Open Docker Dashboard when Docker Desktop starts

  • 功能:Docker 啟動時自動打開 Dashboard(圖形介面)。
  • 建議:喜歡視覺化管理容器的人就勾;若要更省記憶體/不要每次跳出視窗,可取消。

Choose theme → ✔ Use system settings

  • 功能:跟隨作業系統主題(淺色或深色)。
  • 建議:無關緊要,照喜好即可。

Choose container terminal → ✔ Integrated (vs System default)

  • 功能:從容器內打開 terminal 時,使用 Docker Desktop 內建的整合終端。
  • 建議保留 Integrated(更順手且整合資訊顯示較好)。

⚪ Enable Docker terminal (Must be signed in with an active subscription)

  • 說明:需要登入並有付費訂閱才能開啟 Docker-provided shell 功能(某些進階功能)。
  • 建議:若你沒付費,不用理會。

⚪ Expose daemon on tcp://localhost:2375 without TLS

  • 說明:把 Docker daemon暴露成一個不安全的 TCP 端點(allow legacy clients 連線)。這會讓本機任何能連到該端口的程式都能控制你的 Docker(含拉鏡像、執行容器、甚至遠端執行程式)。
  • 安全性高風險 — 可能導致遠端程式碼執行(RCE)。一般開發者不要打開,除非非常確定需要並且在安全網域中。(Docker Documentation, Information Security Stack Exchange)
  • 建議不要勾(保持關閉)。

✔ Use the WSL 2 based engine

  • 說明:在 Windows 上使用 WSL2 作為 Docker 的後端(效能與相容性通常優於 Hyper-V)。
  • 建議保留勾選(你已這樣選,是推薦設定)。(Docker Documentation)

⚪ Add the *.docker.internal names to the host’s /etc/hosts file (Requires password)

  • 說明:把 *.docker.internal 條目寫入主機的 /etc/hosts,讓 Host 與 Container 雙向解析特定內部 DNS 名稱。需要系統密碼來修改 hosts。
  • 建議:只有你有特定 DNS 解析需求才勾(如你在 container 與 host 之間需要固定的 *.docker.internal 名稱解析),一般不用。

✔ Use containers image store (enables native support for multi-platform image, attestations, Was, and more)

  • 說明:這是 Docker Desktop 轉向使用 containerd image store 的選項,能原生支援 multi-platform images、build attestations、SBOM/attestation 等進階功能。開啟後可讓你本地更好地處理跨架構映像(例如 amd64 與 arm64)。(Docker Documentation)
  • 建議:若你會做 multi-arch build 或想使用較新的映像功能,保留勾選。對大多數開發者也無害。

⚪ Send usage statistics

  • 說明:傳送錯誤報告、系統版本與簡單使用資訊給 Docker(匿名或非匿名視情況)。
  • 建議:若不想分享使用資訊可取消;否則勾選有助於產品改進。

⚪ Use Enhanced Container Isolation (Must be signed in with a Business subscription)

  • 說明:企業等級的隔離功能,能減少 container 對 Linux VM 的攻擊面。需 Business 訂閱。(Docker Documentation)
  • 建議:個人/學習者不需要,沒有 Business 訂閱也無法啟用。

✔ Show CLI Hints

  • 說明:在 CLI 執行 Docker 命令時,顯示小提示(例如推薦使用哪些參數或最近使用命令)。
  • 建議保留勾選,對學習 CLI 很有幫助。

✔ Enable Scout image analysis

  • 說明:開啟 Docker Scout 的影像分析功能,可檢視影像內含套件、已知弱點等。Docker Scout 在檢查時可能會保留一些影像的 metadata(若你啟用 repository 分析,會儲存快照以便持續更新弱點資訊)。(Docker Documentation)
  • 建議:若你關心映像安全,開啟是有用的;但要注意:啟用某些 Scout 功能可能會上傳或索引元資料(根據條件)。若在意隱私或不想額外 I/O,考慮關閉或只在需要時打開。

⚪ Enable background Scout SBOM indexing

  • 說明:自動對新建或拉取的映像產生 SBOM(Software Bill Of Materials)並索引,讓 Scout 可以即時更新與偵測弱點。(Docker Documentation)
  • 影響:會消耗額外磁碟與 CPU,且可能會將映像 metadata 保存於本地或(視設定)雲端。
  • 建議:如果你常做安全掃描、自動化 CI 或需要持續監控映像,可考慮勾;作為一般開發者或資源有限的筆電,可先不要勾

安全性 & 資源小抄(重要)

  • 千萬不要Expose daemon on tcp://localhost:2375 without TLS,除非你完全理解風險並且已經在受控網路內(例如特定測試機器且防火牆嚴格)。(Information Security Stack Exchange, Docker Documentation)
  • 若你的機器是筆電、資源有限:考慮關掉「Start Docker Desktop when you sign in」和「Open Dashboard when Docker Desktop starts」,以節省開機記憶體。
  • 想做 multi-arch build 或最新 containerd 功能:保留 Use containers image store。(Docker Documentation)

如果你要,我可以接下來做兩件事(你選其一或都要):

  1. 給你一步一步操作指令(或 GUI 路徑)來改特定幾個選項(例如我教你如何關掉 Expose daemon、或如何關閉 background SBOM indexing)。
  2. 幫你檢查 Resources(CPU/Memory) 合理值,告訴你要分配多少給 Docker Desktop(依你機器規格)。

你想先做哪一個? (1 或 2)