mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 08:27:25 +00:00
fix(ci): attest releases and validate offline examples
This commit is contained in:
@@ -29,7 +29,14 @@ Dockerfile 是一个文本文件,其内包含了一条条的 **指令 (Instruc
|
||||
|
||||
Dockerfile 一般分为四部分:基础镜像信息、维护者信息、镜像操作指令和容器启动时执行指令。
|
||||
|
||||
可运行 `docker buildx build --check` 校验的[完整 Dockerfile 示例](../examples/validated/dockerfile/Dockerfile)与配套 `index.html` 保存在仓库中。章节内的指令片段用于聚焦语法;需要完整构建上下文时,应使用这份示例。
|
||||
可运行 `docker buildx build --check` 校验的[完整 Dockerfile 示例](../examples/validated/dockerfile/Dockerfile)与配套 `index.html` 保存在仓库中。它使用 `scratch`,因此结构检查不会解析远程基础镜像元数据。下面的围栏与该文件由测试强制保持一致。
|
||||
|
||||
<!-- canonical-example: dockerfile -->
|
||||
```dockerfile
|
||||
FROM scratch
|
||||
|
||||
COPY index.html /index.html
|
||||
```
|
||||
|
||||
### 指令详解
|
||||
|
||||
|
||||
Reference in New Issue
Block a user