The template now supports installing packages on Alpine and Debian-based images. The function also skips install if packages are already installed.