How to build a docker multiarch image with buildah

Let’s say we want to build a custom multiarch image named my-image. Very simple and minimalistic Dockerfile example: FROM debian:latest With buildah Login to docker hub or your private registry: buildah login Create a manifest, it is a kind of enveloppe who will contain your docker image with different architectures. buildah manifest create my-manifest Build images and store them in your manifest: for PLATFORM in linux/386 linux/amd64 linux/arm64/v8 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm/v8 linux/s390x linux/ppc64le do buildah bud --manifest my-manifest --platform ${PLATFORM} done $PLATFORM variable use $GOOS and $GOARCH variables, you can get a list by clicking here...

February 9, 2022 · 2 min · JC

Memo git config

Everytime I configure a new PC or env, I search for this: git config --global "John Doe" git config --global "johndoe@domain.tld" git config --global gpg.program gpg git config --global pull.ff only git config --global commit.gpgsign true git config --global init.defaultBranch main git config --global push.default current git config "johndoe@domain.tld"

November 27, 2021 · 1 min · JC

Memo tmux config

Here is my tmux config, works on both MacOS / Linux # source "${HOME}/git/github/tmux-themepack/powerline/default/blue.tmuxtheme" set -g default-terminal "screen-256color" set -g mouse on set -g history-limit 500000 bind '"' split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}" # bind C-x setw synchronize-panes # Memos # tmux list-keys | grep selection # tmux show -wg mode-keys (must return vi, not emacs) # For binding 'y' to copy and exiting selection mode #bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy' bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'

November 27, 2021 · 1 min · JC

Memo vim config with powerline

Powerline install: sudo apt install powerline python3-powerline fonts-powerline Vim config: " All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by " the call to :runtime you can find below. If you wish to change any of those " settings, you should do it in this file (/etc/vim/vimrc), since debian.vim " will be overwritten everytime an upgrade of the vim packages is performed. " It is recommended to make changes after sourcing debian....

November 27, 2021 · 2 min · JC

Terraform and Libvirt provider demo

Terraform is a great tool to build infrastructures. You will see many tutorials on how to use it with AWS, Azure or GCP. But you can do more. I use it to quickly create KVM virtual machines for ansible roles testing, and fun ! Thanks to the Terraform libvirt provider I will explain here how to create a sandbox of three machines. I used it to develop my etcd ansible role....

August 13, 2021 · 4 min · JC