mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 16:37:34 +00:00
Refresh k8s docker versions and references
This commit is contained in:
@@ -84,7 +84,7 @@ RUN apt-get update && \
|
||||
|
||||
#### 3. 使用 `set -e` 和 `pipefail`
|
||||
|
||||
默认情况下,管道命令 `cmd1 | cmd2` 只要 `cmd2` 成功,整个 `RUN` 就视为成功。
|
||||
默认情况下,管道命令 `cmd1 | cmd2` 的返回值由最后一个命令 (`cmd2`) 决定,即使前面的命令失败了,整个 `RUN` 仍可能视为成功。
|
||||
|
||||
**❌ 隐蔽的错误**:
|
||||
|
||||
@@ -193,6 +193,6 @@ wget http://example.com/file.tar.gz
|
||||
EOF
|
||||
```
|
||||
|
||||
> 💡 使用 heredoc 需要在 Dockerfile 首行声明 BuildKit 语法版本:`# syntax=docker/dockerfile:1`
|
||||
> 使用 heredoc 需要在 Dockerfile 首行声明 BuildKit 语法版本:`# syntax=docker/dockerfile:1`
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user