How can I input an enter when in interactive .sh installer in dockerfile?

I want to create a Docker container with Ubuntu to install a custom server,
The custom server has an interactive .sh installer, it requires an enter to be pressed when asked

Press Enter to start installation

How can I do that in docker file?

I tried the method like yes | '/theprogramtoinstall/install.sh' and printf '\n' /theprogramtoinstall/install.sh it just skips the installer and doesn’t install/extract the program
It tells installation is complete but doesn’t extract any file

should I upload the file?