Fixed the usage of an undefined shell variable
Updated docker scripts for the agent with c++ compiler