State of the Setup 2024

I always had some form of homelab/servers running at home. For a while I had a k8s cluster composed of 3 Raspberry pi 4(8g), then a more traditionnal x86 pc, then back on some raspberry pis.. I changed quite a few things this year, having moved from macOS to linux on my work computer, and my own macbook pro 2015 being replaced by an iPad for media consumption, and my linux desktop for gaming/dev etc.. ...

December 17, 2024 · 5 min · 945 words

Remote layer cache for multiple docker CI runners

what and why At $job, we are using jenkins with a dozen or so docker runners, each running their own docker daemon. At least a few hundred builds are carried out daily on these runners, mainly producing docker images that are then pushed onto a testing/production container registry. But two jobs from the same repo might not be using the same CI runner (most of the time they are not). It means each docker runner might need to rebuild the first couple of layers from a given Dockerfile, despite another worker having already built the same layers a few hours/minutes ago. That’s wasting CPU cycles, bandwith, and it’s also increasing the time each build is taking. ...

February 19, 2024 · 10 min · 2083 words

Reset a lost account password using docker

Story time A funny thing happened today. A remote Raspberry Pi deployed a few years back for $client was having issues connecting with another system. When setting up the Pi, I thought of sharing my ssh key from my laptop so I could SSH into it passwordless-style. But it didn’t occured to younger (and stupider apparently) me to save the password for that account somewhere. And on that system (and generally on Debian I believe), standard accounts are in the sudo group, but not with passwordless access, meaning you can run sudo but you have to enter your session’s password. ...

August 9, 2023 · 3 min · 498 words

Reducing Docker Images Size Using Xz

what & why During a project, I needed to build a container that could render graphs based on pretty big arrays, using plotly, kaleido and pandas. The arrays would be DataFrames from pandas, turned into graphs through plotly, and then renderer as jpeg images using kaleido. This is not uncommon to have pretty big dependencies in a python project, but when pulling these pacakges locally, it took quite a long time, so I checked the size of each : ...

September 24, 2021 · 4 min · 794 words

Remote Docker

what & why If you want to control a docker instance (the docker daemon) which is not your machine, you can expose it as a TCP socket (instead of a traditionnal UNIX socket) and connect to it remotely using the docker client. We’ll also use SSH forwarding to secure the connection to the docker api if security is a concern. how Install docker curl -fsSL https://get.docker.com | sh sudo usermod -aG docker $USER then edit the systemd service unit by adding the -H tcp://0.0.0.0:2375 to the ExecStart options. ...

July 11, 2021 · 3 min · 520 words