DockerUtils: unroll and clarify if statement.