# 注册构建并部署应用

在开发环境中连接到本地ICP网络后，就可以在本地注册构建部署应用了。

部署应用步骤：

1. 检查是否在项目根目录
2. 注册构建并部署应用命令

   ```
   dfx deploy
   ```

   `dfx deploy` 命令会输出执行的操作信息

   请注意 `dfx deploy` 命令显示的标识符仅在本地网络环境下有效

   要在外部 Internet Computer 网络上部署, 您必须使用 `--network` 命令行选项和特定网络名称或地址 来注册标识符. 例如, 运行下列命令，以使用别名 `ic` 在 Internet Computer 上部署：

   ```
   dfx deploy --network=ic
   ```
3. 复制 `contacts_assets` canister 标识符到剪贴板

   如果你没有记录标识符，可以运行下面的命令获取

   ```
   dfx canister id contacts_assets
   ```


---

# 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://mixdao.gitbook.io/dfinity/si-.-jiao-cheng/9.-tian-jia-qian-duan-yang-shi/zhu-ce-gou-jian-bing-bu-shu-ying-yong.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.
