fix(builder): remove container only if $JOB is defined

replaces #2344