mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-12 12:51:08 +00:00
Continue to fix format issues
This commit is contained in:
@@ -259,19 +259,3 @@ ENV VAR3=value3
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 本章小结
|
||||
|
||||
| 要点 | 说明 |
|
||||
|------|------|
|
||||
| **语法** | `ENV KEY=value` |
|
||||
| **作用范围** | 构建时 + 运行时 |
|
||||
| **覆盖方式** | `docker run -e KEY=value` |
|
||||
| **与 ARG** | ARG 仅构建时,ENV 持久化到运行时 |
|
||||
| **安全** | 不要存储敏感信息 |
|
||||
|
||||
### 延伸阅读
|
||||
|
||||
- [ARG 构建参数](7.7_arg.md):构建时变量
|
||||
- [Compose 环境变量](../10_compose/10.5_compose_file.md):Compose 中的环境变量
|
||||
- [最佳实践](../16_appendix/16.1_best_practices.md):Dockerfile 编写指南
|
||||
|
||||
Reference in New Issue
Block a user