When building a container from Dockerfile, adding zypper reporsitory fails when added directly via .repo file.
This doesn't work with HTTP nor HTTPS:
RUN zypper ar https://download.opensuse.org/repositories/Documentation:/Containers/openSUSE_Leap_15.2/Documentation:Containers.repo
[ 7s] Step 7/14 : RUN zypper ar https://download.opensuse.org/repositories/Documentation:/Containers/openSUSE_Leap_15.2/Documentation:Containers.repo
[ 7s] ---> Running in eec73e28889d
[ 7s] time="2021-03-04T09:16:07.667877508Z" level=info msg="shim containerd-shim started" address="unix:///run/containerd/s/07e0df958c3161f99da218884c9f8395b79a9fbf9ec45b0b65560336ddeb083b" debug=false pid=28496
[ 8s] Download (curl) error for 'https://download.opensuse.org/repositories/Documentation:/Containers/openS
[ 8s] Error code: Connection failed
[ 8s] Error message: Could not resolve host: download.opensuse.org
This works with both HTTP and HTTPS:
RUN zypper ar http://download.opensuse.org/repositories/Documentation:/Containers/openSUSE_Leap_15.2/ "Documentation:Containers:openSUSE_Leap_15"
Expected Result
Adding a zypper repository by referencing the .repo file does not fail.
How to Reproduce
Add RUN zypper ar https://download.opensuse.org/repositories/Documentation:/Containers/openSUSE_Leap_15.2/Documentation:Containers.repo to your package Dockerfile
I can second this. Adding a repository in the project is not a solution in this case because then the Dockerfile is unusable outside of the context of OBS.
Issue Description
When building a container from Dockerfile, adding zypper reporsitory fails when added directly via .repo file.
This doesn't work with HTTP nor HTTPS:
RUN zypper ar https://download.opensuse.org/repositories/Documentation:/Containers/openSUSE_Leap_15.2/Documentation:Containers.repo
This works with both HTTP and HTTPS:
RUN zypper ar http://download.opensuse.org/repositories/Documentation:/Containers/openSUSE_Leap_15.2/ "Documentation:Containers:openSUSE_Leap_15"
Expected Result
Adding a zypper repository by referencing the .repo file does not fail.
How to Reproduce
RUN zypper ar https://download.opensuse.org/repositories/Documentation:/Containers/openSUSE_Leap_15.2/Documentation:Containers.repo
to your package Dockerfileosc build