Skip to content

Commit ed1f51d

Browse files
committed
build: use a site param for example alpine versions
Signed-off-by: David Karlsson <[email protected]>
1 parent 62aae99 commit ed1f51d

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

content/build/building/multi-platform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ cURL installed for multiple architectures:
193193

194194
```dockerfile
195195
# syntax=docker/dockerfile:1
196-
FROM alpine:3.16
196+
FROM alpine:{{% param "example_alpine_version" %}}
197197
RUN apk add curl
198198
```
199199

content/build/building/multi-stage.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
22
title: Multi-stage builds
3-
description: 'Learn about multi-stage builds and how you can use
4-
3+
description: |
4+
Learn about multi-stage builds and how you can use
55
them to improve your builds and get smaller images
6-
7-
'
86
keywords: build, best practices
97
aliases:
108
- /engine/userguide/eng-image/multistage-build/
@@ -22,11 +20,11 @@ stage of the build. You can selectively copy artifacts from one stage to
2220
another, leaving behind everything you don't want in the final image.
2321

2422
The following Dockerfile has two separate stages: one for building a binary,
25-
and another where we copy the binary into.
23+
and another where the binary gets copied from the first stage into the next stage.
2624

2725
```dockerfile
2826
# syntax=docker/dockerfile:1
29-
FROM golang:1.21
27+
FROM golang:{{% param "example_go_version" %}}
3028
WORKDIR /src
3129
COPY <<EOF ./main.go
3230
package main
@@ -71,7 +69,7 @@ Dockerfile are re-ordered later, the `COPY` doesn't break.
7169

7270
```dockerfile
7371
# syntax=docker/dockerfile:1
74-
FROM golang:1.21 as build
72+
FROM golang:{{% param "example_go_version" %}} as build
7573
WORKDIR /src
7674
COPY <<EOF /src/main.go
7775
package main

content/build/ci/github-actions/named-contexts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
context: .
4444
build-contexts: |
45-
alpine=docker-image://alpine:3.16
45+
alpine=docker-image://alpine:{{% param "example_alpine_version" %}}
4646
tags: myimage:latest
4747
```
4848

hugo.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ params:
100100

101101
example_go_version: "1.21"
102102
example_golangci_lint_version: "v1.52"
103+
example_alpine_version: "1.19"
103104

104105
min_api_threshold: 1.41
105106

0 commit comments

Comments
 (0)