[Generated by AI](https://www.bing.com/images/create/a-nice-logo-for-a-blog-post-about-file-system-in-c/1-65ef5d10460f428181c3ff8bcc359936?id=goqww%2bR2QLJoCYN4XjxV2w%3d%3d&view=detailv2&idpp=genimg&idpclose=1&thId=OIG2.yF78KU7PXi.xzuZrKVJa&FORM=SYDBIC)

Best practices for writing Dockerfiles - Follow "Filesystem Hierarchy Standard"

When it comes to building Docker images, adhering to the “Filesystem Hierarchy Standard”12 can greatly enhance the organization and maintainability of your containers. Unfortunately, it’s not uncommon to encounter Docker images where files are haphazardly scattered across directories, leading to confusion and unnecessary complications. Let’s delve into some best practices to ensure your Dockerfiles follow the FHS guidelines, thus avoiding common pitfalls and streamlining your container development process. Below you can find the most important directories, from the perspective of Docker images....

2024-03-11 · 3 min · timor
[Ko-fi](https://more.ko-fi.com/brand-assets)

Monetize your blog with Ko-fi shortcodes for Hugo sites

Introduction Being the owner of this blog, I often find joy in revisiting past endeavors that may no longer be part of my daily work. From fine-tuning website performance to delving into the intricacies of SEO, I relish the opportunity to explore various aspects of digital craftsmanship. One aspect that particularly piques my interest is finding creative ways to monetize my blog without resorting to intrusive advertisements. As a steadfast supporter of Open Source principles, I value the ability for people to express their appreciation through voluntary contributions or tips, on their own terms....

2024-03-08 · 3 min · timor
[Photo by Pixabay](https://www.pexels.com/photo/orange-and-white-seashell-on-white-surface-33234/)

The power of extensive command history in Bash and Zsh

I rely heavily on shell usage. For over 15 years, I was a devoted user of Bash until I discovered Zsh and made the switch. One thing that remained constant throughout my transition was my configuration to maintain an extensive commands history. This setup is replicated across all my systems. When you spend a lot of time coding, you often find yourself repeating commands or running variations of them. Remembering all these commands can be challenging, but with resources like Google and ChatGPT, it’s not always necessary....

2024-03-05 · 3 min · timor
[Cloudflare Pages](https://pages.cloudflare.com) and [Hugo](https://gohugo.io)

Optimizing Hugo static site redirects with Cloudflare Pages

I used to utilize GitHub Pages to serve static content for my blog. I secured it behind Cloudflare to employ a custom domain and automate HTTPS certificate management. Additionally, I utilized a few Page Rules to implement redirects: From www.* to non-www, From HTTP to HTTPS, And for some SEO renaming. Unfortunately, in the Free plan from Cloudflare, you are limited to: 3 Page Rules (with simple glob matching), 10 Transformation Rules (no regex rules), 10 Redirect Rules (no regex)....

2024-03-04 · 3 min · timor
[Photo by Miguel Á. Padriñán](https://www.pexels.com/photo/close-up-shot-of-keys-on-a-red-surface-2882652/)

SEO kicks my stats

Towards the end of the year, I received a notification reminding me to renew the domain for my blog. The domain in question was timor.site. This was the first invoice I had received from GoDaddy since they acquired Uniregistry, and to my dismay, it was significantly more expensive than what I had been accustomed to paying. With the year drawing to a close, I was reluctant to invest too much time or money into the renewal process....

2024-03-03 · 2 min · timor
[Renovate Bot](https://github.com/renovatebot/renovate)

Automatic updates of Docker images with Renovate Bot

I’ve been writing recently about best practices for patching and deprecating Docker images , but today I want to show how to automate a huge part of this process. You might already hear about Dependabot1, it’s a Github’s way to notify developers about security vulnerabilities in their projects. Renovate2 is similar tool3, but doesn’t require Github. For my professional work I use Bitbucket, so Renovate feels more universal as can be used anywhere....

2024-03-01 · 4 min · timor
[Mermaid](https://mermaid.js.org)

Adding Mermaid diagrams to Hugo

I used Chart.js charts on one of my Hugo blogs for few years already. Recently I needed to add few diagrams and I started glueing them in Chart.js but then I found that Hugo supports GoAT and Mermaid diagrams  external link . They’re not working out of the box, but it’s easy to extend. Much easier than my custom shortcodes. I tried to follow up the instruction1 but failed. After few minutes I found slightly simpler solution....

2024-02-25 · 2 min · timor
[Photo by Antony Trivet](https://www.pexels.com/photo/herd-of-blue-wildebeest-walking-in-savanna-6053000/)

How I stopped worrying and loved Makefiles

First contact with make When I was invited for my first job interview in the IT, I’ve been asked such question: How would you typically build a program from sources, what commands will you use? I answered: It’s obvious: ./configure make make install Those times belong to the past now and nowadays not many programmers use GNU Make1. Try asking this question and you will see disgust at best. For many it’s the fist contact with make and often the last one, but not for me 😉...

2024-02-16 · 9 min · timor
[xkcd.com](https://xkcd.com/349/)

Best practices for patching and deprecating Docker images

Intro One of the biggest benefits of Docker images is their immutability. Once they’re built, they don’t change. Built once, would work forever… That’s how nightmares of security guys starts 🤣 We have then two contradictory concepts: flowchart LR id1(Keep it stable) <---> id2(Keep is up to date and secure) For day to day work, usually first concept wins. You want your builds stable and try to avoid tempting distractions of upgrading log4j to latest version… Who knows what might break....

2024-02-09 · 7 min · timor
AI generated

How to run x86-64 Docker images on Apple's MacBook with M1/M2/M3 CPU

Working with Docker environments amid diverse architectures, like Apple’s arm64 and x86-64/AMD64, presents challenges. I’ve encountered the clash between my Mac’s M1 arm64 architecture and my x86-centric server workloads. The solution? Just use DOCKER_DEFAULT_PLATFORM 1 2. Just run in the terminal: Enforce platform for all commands export DOCKER_DEFAULT_PLATFORM=linux/amd64 With this command, Docker enforces x86 architecture by default on commands supporting --platform parameter, streamlining workflows and sparing the need for repetitive --platform specifications....

2024-02-06 · 1 min · timor