builder: include environment when running an exec
Some container execs have an environment, let's make sure they are
included when running exec.
NOTE: This is for Rocky and below as docker was the only supported
method in these versions. Additionally in Rocky and below, the
environment was a list and not a dictionary so we only support a list
version for the environment.
(cherry picked from commit