Monthly Archives: August 2015

Fedora Tools Docker image

I got this request from my colleagues if there is something like Red Hat Atomic Enterprise Tools container image available for Fedora or CentOS. The answers was no, there isn't, thus I started to work on it. I'd like to tell you what it is and why do I invest my time into it.

First of all, Fedora Tools image is meant to be used mostly on Atomic Host as there is no way to install missing tools with yum or dnf. We could create tons of small images each containing a single tool. But that would a) make it hard for users to find all the tools, b) consume more space then a single image if you decide to use many (all...) of them, c) be hard to maintain.

These 3 reasons lead us to create a single image containing big number of tools important to sysadmins, performance analysts, or just users that need man pages on Atomic Host. This image is pretty big (more than 1 GB), but can be pretty useful.

Current version of the Dockerfile can be found in Fedora-Dockerfiles repository. You can find the list of additional packages (to what's already in a base image) starting on line 13.

The basic information on how to use the Fedora Tools Docker image can be found in README file and I hope to provide more how-to's here soon:).

I've set up an automated build as vpavlin/fedora-tools under my namespace on Docker Hub. To try the image, you can do:

atomic run vpavlin/fedora-tools


Taskwarrior in a Docker container

So I heard about great tool - Taskwarrior. Cool, let's try it. Well, sure, but why should I install another bunch of RPMs to my laptop? Not that it matters a lot, but I hate to have my system bloated with unused packages which are installed as dependencies, but stay there when I remove the "root" package. Let's go crazy and create a simple Taskwarrior container.

I started with plain Dockerfile.

FROM fedora
MAINTAINER Vaclav Pavlin <>
RUN dnf -y install task
VOLUME /task_data


That was not ideal because the final container missed very important settings - data location. So I added 2 lines which initialized ~/.taskrc and changed the data location to a well known path. I also added man command to the mix so that I can display manual pages for Taskwarrior. Final Dockerfile follows

FROM fedora
MAINTAINER Vaclav Pavlin <>
RUN dnf -y install task man
VOLUME /task_data
RUN yes | task || true
RUN sed -i 's#\(data.location=\).*#\1/task_data#' ~/.taskrc

Still pretty simple, isn't it? Now, how to run this image? Just call the following command, there is an image ready for you on Docker Hub:

docker run -it --rm -v $HOME/.task:/task_data vpavlin/task

The command above will start a container which will initialize few files in $HOME/.task directory and print output like this:

[task next]
No matches.

You can try some fancy stuff with Taskwarrior itself now:

Screenshot from 2015-08-18 16-40-32Well, it works. But also is pretty ugly. Let's make the user experience nicer and smoother. You can simply create an alias for docker run command. For example like this one:

$ alias task="docker run -it --rm -v $HOME/.task:/task_data vpavlin/task"
$ task
[task next]

ID Age Project Tag Description Urg 
 1 6s blog today This is a test taks for my blog post 1.9

1 task

Then, when you call task, you will get the same output as if Taskwarrior was installed on you machine. Also your data will be stored locally so you don't have to be afraid of losing them when you remove container/image.

I also wrote a simple task function which you can paste in your ~/.bash_aliases file which lets you either use Taskwarrior as with the alias above, or you can do

task CMD man task

Note CMD in the command - that will let the bash function know to run different command than the one specified in Dockerfile - f.e. view the man pages.

I also strongly suggest to set the data location (i.e. the volume mount, or $data_dir variable in the function) to a backed up folder. I, for example, use Dropbox, so that I can access and modify my tasks from any machine (basically just by pulling and running the Docker image).