[Photo by Ghasiq Anjum from Pexels](https://www.pexels.com/photo/metal-trash-bin-on-the-side-of-the-street-12841982/)

Best practices for writing Dockerfiles - Use VOLUME for all mutable, temporary file locations

IMO people don’t understand how VOLUME1 works so they don’t use it. It’s generally used far too rarely! In short VOLUME means two things: Whatever is left in directory marked as VOLUME, stays there and can’t be changed in later layers (actually it can be changed but changes won’t be persistent). Volumes are not part of layered image FS. They’re mounted as anonymous volumes located on standard file system. This means they’re working much faster....

2022-09-12 · 2 min
[Photo by Tom Fisk from Pexels](https://www.pexels.com/photo/birds-eye-view-photo-of-freight-containers-2226458/)

Best practices for writing Dockerfiles - Use .dockerignore

People often complain, that building Docker image takes a long time. “I just added a single jar package” they say… Really? They often don’t remember that whole “build context”1 is uploaded to Docker daemon during build, which often means they’re not only adding “single jar”, but also all sources, test results and whatever they have in working directory. Solution is simple - to use .dockerignore file2. Syntax is similar to ....

2022-09-11 · 1 min
[Photo by Tom Fisk from Pexels](https://www.pexels.com/photo/top-view-photography-of-cargo-ship-with-intermodal-containers-3057963/)

Dockerfile writing best practices

I’ve been thinking for a long time about writing set of articles on the topic of: “Dockerfile writing best practices”. As it’s often my daily job to prepare best in class containers, that are later used by thousands of company’s applications, I have quite good insights on the topic. Some experience and knowledge gathered is often against intuition and building it took me a while. I want to share it, with a hope that feedback I get will allow me to excel on the topic even further....

2022-09-10 · 2 min

Ford S-MAX - kasowanie ostrzeżenia wymiany oleju

Auta się zmieniają a problemy z nimi pozostają te same :) Kasowanie ostrzeżenia wymiany oleju 1 Przekręcić kluczyk w stacyjce do drugiej pozycji, gdy zapalają się wszystkie kontrolki (nie uruchamiamy silnika). Wciskamy równocześnie pedały hamulca i gazu do oporu, trzymamy do zakończenia procesu. Pojawi komunikat o rozpoczęciu resetowania inspekcji. Możemy zatwierdzić OK. Czekamy aż pojawi się komunikat: Zatwierdzamy OK. Dopiero teraz zwalniamy pedały. https://forum.fordclubpolska.org/showthread.php?t=108532 ↩︎

2022-09-03 · 1 min
Devoxx 2022

Back on the big stage!

I’m back on the big stage! I haven’t attend any big conferences as presenter for some time, but this year will change it. I’m starting big, with a talk: Docker base images - Ideas how to manage them on scale on Devoxx conference in Kraków, that will take place on 22-24th June 2022. Want to meet? Meet there 😄 Update I uploaded slides from presentation to my Github account.

2022-06-13 · 1 min
[Photo by Markus Winkler from Pexels](https://www.pexels.com/photo/wood-dirty-rope-door-3828944/)

Creating fully encrypted ZFS pool

What I want to do? I use my pool to securely store backups, archive my old documents and keep huge family’s photo library. I have new disks. They were tortured with badblocks, so they’re ready to create ZFS pool. I’ve read few documents about different approaches 1 2 3. I wanted to be sure if anything changed during past years. One of articles recommends mirroring over RAIDZ. Resilvering is faster, at the same time putting IO less stress on whole pool....

2021-11-22 · 5 min

Shucking WD Elements 14TB

I used to have RAID (or at least some variation of it) for my main storage. For redundancy, in case of disk failure. I started with some crazy LVM mirrors done on two disks of different size. Sync job was starting on every boot 😄 Then came time for RAID5 on mdadm + LVM for volume management. It was working nice until the moment when disks became bigger. Long array rebuilds or checks, required my PC to stay turned on overnight just to validate if stuff works still....

2021-11-12 · 6 min
[Photo by Christina Morillo from Pexels](https://www.pexels.com/photo/eyeglasses-in-front-of-laptop-computer-1181253/)

Automatically add ticket ID to every commit message in Git

I don’t know how it is in your company, but in mine it’s considered a good practice to add ticket numbers to commit messages. It allows to easily determine why something was changed, etc. Makes sense, but this also means, that I should be adding this ticket to every message… And this doesn’t make sense for me. I will accidentally avoid it from time to time or make a lot of typos....

2021-11-09 · 2 min

Resize images from command line on MacOS

I was updating my blog and needed to generate few variants of images, in different resolution. Option 1 - sips There’s simple, builtin tool sips, that can be used for simple resizing 1: Resize single image sips -Z 36 orig.png --out static/favicon36x36.png -Z - maintain image aspect ratio 36 - maximum height and width It can be also used for batch image processing: Warning Beware, without –out param, it will overwrite images in place!...

2021-11-07 · 2 min

Homebrew - uninstall formula with dependencies

I use brew extensively on MacOS. It’s just as convenient as many Linux package managers. What I don’t like, it leaves dependencies after removal of formula. There’s simple way to clean it up by running one command 1. Uninstall with dependencies brew uninstall FORMULA brew autoremove Info In my case running brew autoremove actually removed few packages I really wanted to have. Check the output carefully! https://stackoverflow.com/questions/7323261/uninstall-remove-a-homebrew-package-including-all-its-dependencies ↩︎

2021-11-05 · 1 min