avoid possible NPE
avoid duplicate javaagent commands
avoid create image in sample code
#1119 dont use dots in tags which seems to break in docker 0.10