docker/docker — pull request #9663 by tatsuya6502 (2014-12-14 16:23:36+00:00)
Title: mkimage-arch: Kill gpg-agent started in the chroot env

Add `pkill gpg-agent || true` after pacman-key command in chroot env to kill gpg-agent if it's running.

Arch Linux's gnuepg package has just been updated to 2.1, which does auto-start gpg-agent as documented(*1). pacman-key command depends on gnupg and running it in the chroot environment causes gpg-agent to start. This will make chroot to fail to umount $ROOTFS/dev because gpg-agent seems to open it.

Tested with Arch Linux 2014-12 and Docker 1.4.0.

----
*1: https://gnupg.org/faq/whats-new-in-2.1.html#autostart