Description
zypper install can wait for confirmation during an automated Docker build.
Potential impact
An unanswered prompt can stop the build and delay deployment.
Remediation
Use zypper install -y and clean the package cache after a successful installation. Run the build without user input and check the exit status. Handle any required license acceptance separately.
Examples
These commands run as root in a SUSE-based image. Configure a repository that provides curl before running them.
Before
dockerfile
RUN zypper install curl && zypper clean
After
dockerfile
RUN zypper install -y curl && zypper clean