docker build: ensure environmental variables set even in non-interactive environments. Additional space cleanup for smaller image sizes