You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/building-images-bake/index.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,23 +22,23 @@ summary: Creating a container image for CloudNativePG Operator v2.0
22
22
## Summary
23
23
In an almost [two years old blog post]({{% ref "/blog/creating-container-images/" %}}), we explained how
24
24
to build a custom container image for CloudNativePG. After two years, many things have changed in the world of containers.
25
-
One of those things was the introduction of [Bake](https://www.docker.com/blog/bake/) in Docker, which allows you to build
25
+
One of those things was the introduction of [Bake](https://docs.docker.com/build/) in Docker, which allows you to build
26
26
images using a simple configuration file. Bake is now our recommended way to build images for CloudNativePG.
27
27
28
28
We will follow a simple cooking recipe to create a custom container image or a set of container images, since Bake
29
29
allows you to build multiple images at once in a simple way.
30
30
31
31
## Ingredients
32
32
33
-
- A bake file. We will use the one provided in the [CloudNativePG repository](https://github.com/cloudnative-pg/postgres-containers/blob/main/docker-bake.hcl)
33
+
- A Bake file. We will use the one provided in the [CloudNativePG repository](https://github.com/cloudnative-pg/postgres-containers/blob/main/docker-bake.hcl)
34
34
35
35
Cooking time: 5 minutes.
36
36
37
37
## Instructions
38
38
39
-
### Step 1: Prepare local bake file
39
+
### Step 1: Prepare local Bake file
40
40
41
-
In a local file with name `bake.hcl`, we add the following content, which is a simple bake file that will build a custom image
41
+
In a local file with name `bake.hcl`, we add the following content, which is a simple Bake file that will build a custom image
42
42
43
43
```hcl
44
44
extensions = [
@@ -84,7 +84,7 @@ There are a few things that we should remark here:
84
84
- The `pgVersion` is a variable list that contains basically, the MAJOR.MINOR version of PostgreSQL
85
85
- The `name` is the name that we will use later to refer to one element of the matrix that we created
86
86
- The `args` lists all the arguments passed to the Dockerfile. We will talk more about this later.
87
-
- The function `getExtensionsString()` is inherited from the bake file that we reference in the [Ingredients](#ingredients) section
87
+
- The function `getExtensionsString()` is inherited from the Bake file that we reference in the [Ingredients](#ingredients) section
88
88
89
89
### Step 2: Build the image
90
90
@@ -94,15 +94,15 @@ We can now build the image using the following command:
0 commit comments