Building Docker 0.9.0 on openSUSE

7 January 2014

Here are a few notes about bumps and bruises collected while attempting (and achieving some success) to build a RPM for openSUSE on their Open Build Service.

  • first stumble revolved around an error with a message from ld containing info ‘cannot find -lpthread’, followed with another similar error ‘cannot find -lc’. Unfortunately, I found no rpm libpthread and got diverted by rpm libpth, another threading library. libpthread is provided by glibc. In particular, dockerinit is linked statically, so the BuildRequires: glibc-devel-static, following spec file syntax.

  • The attempt at building on local machine failed with ‘No such file or dir’ for <btrfs/ioctl.h> and <libdevmapper.h>. These were corrected by installing libtrfs-devel and device-mapper-devel rpms respectively and the ..\/hack\/ dynbinary build worked following this. The existing spec file contained BuildRequires for both of these.

  • (re)learned about having to checkout something other than the default branch after a git clone. Ended up using tag release-0.9.

  • rpm spec cannot include a version info which is non-numeric. So watch out for VERSION file which is used by docker make but spec file will not match in the instance that the VERSION file contains 0.9.0-dev.

  • (made obsolete by Flavio)Docker 0.9.0 rpm

  • Docker 0.9.0 rpm

    • should be building for openSUSE_12.3 and openSUSE_13.1 soon (03/25/14)

After installing rpm:

  • add docker group to intended user(s)
  • edit /usr/lib/systemd/system/docker.service (if use of btrfs is desired)
    • ExecStart=/usr/bin/docker -d -s btrfs
  • enable docker.service (systemctl enable /usr/lib/systemd/system/docker.service)
  • a restart (or other start of the docker.service), should then start the docker daemon