Sep 25A use case for multi-stage buildsUpon revisiting one of my past projects, I attempted to build the docker image I once prepared but encountered a failure: $ docker build -t fortune-api:0.4.2 \ 'https://github.com/lbacik/fortune-api.git#v0.4.2' ... 6.520 Reading state information... 6.523 E: Unable to locate package fortunes-off 6.523 E: Unable to locate package fortunes-fr ... ERROR: failed to solve: process…Docker3 min readDocker3 min read
Sep 8“Per-branch” environmentHi! I have been working on an idea I would like to share for some time. It’s about organising the testing/staging/remote development environments for web projects in a way that enables instantiating each branch or tag of a given project simultaneously. What does it mean? Imagine that you are working…DevOps13 min readDevOps13 min read
May 7The LOCK — a race condition caseHi there! Here is a brief overview of my struggles with an interesting (I think) race condition example. It has been taken from a real-life scenario; however, a different technology was initially used. But… the technology doesn’t matter (does it?) — what counts is the theory! …Programming10 min readProgramming10 min read
Mar 2Asynchronous PHPIt is not an article about the parallel extension (or any other one that brings the power of threads into the PHP) — as a matter of fact I don’t think (as for the time being) there are any good use cases for using threads in PHP (there are other…PHP5 min readPHP5 min read
Dec 17, 2022Value ObjectsThis article discusses the use of Value Objects in the context of PHP applications. The article presents step-by-step implementations of an example Value Object (class Person), as well as the use and discussion of the lbacik\value-object library. Presented examples utilise the phpspec framework as the test platform (one does not…Programming11 min readProgramming11 min read
Nov 21, 2021The Magic of the Linux Namespaces — a short exerciseTL;DR version: Below you can find the explanation of the above exercise :) Terminal 1 Start a container $ docker run -ti debian Now, two short tests — check the IP address assigned to the container and create a “foo-bar” file in its root filesystem (first checking that it doesn’t exist…Linux2 min readLinux2 min read
Mar 27, 2021FortuneIt looks like “fortune” (the computer program described in Wikipedia as a Fortune (Unix)) has been around for something like 40 years already. It is a simple program that prints out a randomized quotation from its database, e.g.: ➜ ~ fortune The first duty of a revolutionary is to get…Fortune Cookies7 min readFortune Cookies7 min read
Nov 18, 2020(neo)Vim, Codi & PHPCodi is a vim plugin to run your code in the editor. Who knows Quokka (which in my case was the first such a tool I’ve been using) knows what I mean. I can’t say, at least for the time being, whether it increases productivity or not — in my…Vim5 min readVim5 min read
Sep 26, 2020Linux Namespaces (part 5/5)Docker & Lxc — In the previous four parts I have described (more or less detailed) Linux Namespaces — now let’s practice more with docker and Lxc! If you have any docker container started in your system — check its PID: $ docker inspect CONTAINER | grep -i pid e.g.: $ docker inspect ba26bbd2de76…Linux5 min readLinux5 min read
Sep 19, 2020Linux Namespaces (part 4/5)Namespace: Network (net) — Network NS is quality itself :) It may be the only NS (maybe except for mnt) the independent use of which could be not only “demonstrative”, but also completely practical. A great example of this is the Mininet project! To present you a part of possibilities that give us net…Linux3 min readLinux3 min read