Backport caskdata/cdap#767 for Docker support