@@ -22,12 +22,12 @@ summary: How I used Jonathan's blog post to create an hcl for my needs.
2222---
2323
2424## Summary
25+
2526The other week [ Jonathan Gonzalez] ({{% ref "/authors/jgonzalez/" %}}) wrote an
2627article on
2728[ how to customize docker images using an override hcl file] ({{% ref "/blog/building-images-bake/" %}}) .
28- Before the [ postgres-containers repo] ( (https://github.com/cloudnative-pg/postgres-containers) )
29- was enhanced with the option to build the images with ` docker build bake ` ,
30- I had to do this steps manually in order to have custom images for our workloads.
29+ Before the [ postgres-containers repo] ( https://github.com/cloudnative-pg/postgres-containers )
30+ I had to follow these steps manually in order to have custom images for our workloads.
3131
3232 - clone the repo
3333 - edit the dockerfile
@@ -36,9 +36,9 @@ I had to do this steps manually in order to have custom images for our workloads
3636
3737Edit, build and push had to be done for each PostgreSQL version.
3838So a lot of boring work needed to be done in order to have updated images.
39- The chance to avoid this work sounds promising to me, so I started with the
40- [ hcl file] ( ( https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg.github.io/refs/heads/main/content/blog/building-images-bake/bake.hcl) )
41- Jonathan wrote and adopted it to fit my needs.
39+ The chance to avoid this work sounded promising to me, so I started with the
40+ [ hcl file] ( https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg.github.io/refs/heads/main/content/blog/building-images-bake/bake.hcl )
41+ Jonathan wrote, and adapted it to fit my needs.
4242After a troubleshooting session, he asked me to share the changes I made.
4343So here are my detailed instructions, in case they could prove useful to others.
4444
@@ -134,7 +134,7 @@ this information every time I build an image.
134134- The ` platforms ` variable is ` linux/amd64 ` for all of my images.
135135- The ` extensions ` variable contains some extensions I use regularly.
136136- The ` dockerfile-inline ` part is extended with binaries, some of them are handy
137- to have, some needed by extensions or other tools I use e.g. [ pgwatch] ( ( https://github.com/cybertec-postgresql/pgwatch) ) .
137+ to have, some needed by extensions or other tools I use e.g. [ pgwatch] ( https://github.com/cybertec-postgresql/pgwatch ) .
138138- With the ` sed ` command I add needed locales and build them.
139139- With the ` ADD ` commands I extend the image with
140140 - .psqlrc file, to have a nice psql Command-line even when connecting via
@@ -152,7 +152,7 @@ docker buildx bake -f docker-bake.hcl -f cwd://bake.hcl "https://github.com/clou
152152### Step 3: Use it
153153
154154The only missing step to use the images is to update your
155- [ Image Catalog / Cluster Image Catalog] ( ( https://cloudnative-pg.io/documentation/current/image_catalog/) )
155+ [ Image Catalog / Cluster Image Catalog] ( https://cloudnative-pg.io/documentation/current/image_catalog/ )
156156with the newly built images.
157157Test them and stage them through your environment.
158158
0 commit comments