Hi folks,

Looking to automate addition of repo and software in Dockerfile.

The goal is to automate snapd installation:

Code:
RUN zypper addrepo http://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_42.3/ snappy
RUN zypper install snapd
RUN systemctl enable --now snapd.socket
What I am missing is how to make zypper non-interactice, that checks that GPG key is valid. It is not about --no-gpg-check nor --gpg-auto-import-keys, but about non interactive import of known key.

Code:
New repository or package signing key received:

  Repository:       snappy                                                      
  Key Name:         system:snappy OBS Project <system:snappy@build.opensuse.org>
  Key Fingerprint:  4F2FA05B 2C6589C3 FD12055E F7C6E425 ED340235                
  Key Created:      Fri Jul  8 09:02:38 2016                                    
  Key Expires:      Sun Sep 16 09:02:38 2018                                    
  Rpm Name:         gpg-pubkey-ed340235-577f6c2e
For security, I do not want to blindly accept any key.