Building Container Images with Buildah and Ansible

Update: I started a tool which simplifies all of this into a single command: TomasTomecek/ab.

Do you use Ansible roles to provision your infrastructure? And would you like to use those very same roles to create container images? You came to the right place!

We are working on a project (and you problably heard of it already) called Ansible Container. It’s not just about creation of container images. It covers the complete workflow of a containerized application. From build, local run, test to deploy.

In this blog post, I would like to show you how Ansible Container does those builds — from an Ansible role to a container image.

Keep reading

Removing messages with notmuch

Disclaimer: this is very likely not safe, use it at your own risk, I don’t account for any harm.

So you can’t remove messages with notmuch:

While notmuch does not support, nor ever will, the deleting of messages...

That’s a fact. But what if it could help you with that? A lot actually.

Keep reading

Non-blocking stdin with python using epoll

I was playing with epoll and was curious whether I can use it to monitor sys.stdin. The biggest issue was that sys.stdin.read() is blocking and I had no way to figure out whether I read the descriptor fully or not (making the epoll useless pretty much). Until I changed it to non-blocking with fcntl.

Keep reading

LinuxCon ContainerCon Europe 2016

Here are my assorted notes from some ${subject} talks.

Keep reading

Flock 2016: my notes

Last week we were at Flock 2016 which was held in Krakow, Poland. Awesome event, lots of news, great people, plenty of conversations and fun.

Here is a list of my notes:

Keep reading

Automatic mounts with systemd

So I wanted to setup automatic mounting (read as autofs) with systemd, without using fstab.

Unfortunately, the man page didn’t have any examples so it wasn’t that easy to figure out. Luckily there is an excellent guide at RHCSA course [1].

Tl;dr

Keep reading

Tips and tricks to write Dockerfiles

After my yesterday talk at DevConf 2016 I got asked about some tips and tricks how to write Dockerfiles. I know we have plenty of resources for that in Red Hat, Fedora and Project Atomic. So, here we go!

Keep reading

Copy your private GPG key to a new machine

It’s really simple to copy your private GPG keys to another machine of yours. Let’s do public key first: $ gpg --export --armor KEY | ssh me@my-other-machine 'gpg --import' gpg: keyring `/home/me/.gnupg/secring.gpg' created gpg: keyring `/home/me/.gnupg/pubring.gpg' created gpg: /home/me/.gnupg/trustdb.gpg: trustdb created gpg: key 4937B925: public key "KEY" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) It worked! Now the private: $ gpg --export-secret-key --armor KEY | ssh me@my-other-machine 'gpg --import --allow-secret-key-import' gpg: key 4937B925: secret key imported gpg: key 4937B925: "KEY" not changed gpg: Total number processed: 1 gpg: unchanged: 1 gpg: secret keys read: 1 gpg: secret keys imported: 1 (--armor is optional, it’s just for sake of checking the output first before piping it to ssh)…

Keep reading

Build docker engine on Fedora

It’s not that hard, here are a couple pain points:

  • make sure that GOPATH is right — you want to compile against your checked out docker, not master docker

Keep reading

Running chromium in docker container

I’ve just managed to dockerize chromium. The package itself is taken from spot’s copr repo. Jessie Frazelle’s blog post helped me a lot!

It looks like this:

Keep reading