updated docker function