docker: fixed race condition on inject envs tests.

related to #613.