I've uploaded an image with JGroups and a few demos to DockerHub [2].
The image is based on Fedora 20 and contains JGroups, plus a few scripts which run a chat demo, a distributed lock demo and a distributed counter demo.
To run this, it's as simple as executing
docker run -it belaban/jgroups
This will drop you into a bash shell and you're ready to run any of the three demos.
Start multiple containers and you have a cluster in which you can try out things, e.g. a cluster node acquiring a lock, another node trying to acquire it and blocking, the first node crashing and the second node finally acquiring the lock etc.
Note that this currently runs a cluster on one physical box. I'll still need to investigate what needs to be done to run Docker containers on different hosts and cluster them [3].
The Dockerfile is at [1] and can be used to derive another image from it, or to build the image locally.
[1] https://github.com/belaban/jgroups-docker
[2] https://registry.hub.docker.com/u/belaban/jgroups/
[3] https://issues.jboss.org/browse/JGRP-1840