# 編輯網路設定檔案

Docker 1.2.0 開始支援在執行中的容器裡編輯 `/etc/hosts` 、 `/etc/hostname` 和 `/etc/resolve.conf` 檔案。

但是這些修改是臨時的，只在執行的容器中保留，容器終止或重啟後並不會被保存下來。也不會被 `docker commit` 提交。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://philipzheng.gitbook.io/docker_practice/advanced_network/config_file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
