Installing the SDK in a SLES11SP3 Docker container

Hello,

$SUBJECT – Is it possible to access the SDK repositories inside a Docker container?

What I have tried so far:

[LIST]
[] Installed sle2docker, sles11sp3-docker-image, activated sles11sp3-docker.x86_64-1.0.0-Build6.1 with sle2docker
[
] zypper lr inside the container lists the following repositories:

[CODE]# zypper lr
Refreshing service ‘container-suseconnect’.

| Alias | Name | Enabled | Refresh

—±--------------------------------------------------±----------------------------------------------±--------±-------
1 | container-suseconnect:SLE11-Public-Cloud-Module | SLE11-Public-Cloud-Module for sle-11-x86_64 | No | Yes
2 | container-suseconnect:SLE11-SP1-Debuginfo-Pool | SLE11-SP1-Debuginfo-Pool for sle-11-x86_64 | No | No
3 | container-suseconnect:SLE11-SP1-Debuginfo-Updates | SLE11-SP1-Debuginfo-Updates for sle-11-x86_64 | No | Yes
4 | container-suseconnect:SLE11-SP2-Debuginfo-Core | SLE11-SP2-Debuginfo-Core for sle-11-x86_64 | No | No
5 | container-suseconnect:SLE11-SP2-Debuginfo-Updates | SLE11-SP2-Debuginfo-Updates for sle-11-x86_64 | No | Yes
6 | container-suseconnect:SLE11-SP3-Debuginfo-Pool | SLE11-SP3-Debuginfo-Pool for sle-11-x86_64 | No | No
7 | container-suseconnect:SLE11-SP3-Debuginfo-Updates | SLE11-SP3-Debuginfo-Updates for sle-11-x86_64 | No | Yes
8 | container-suseconnect:SLE11-Security-Module | SLE11-Security-Module for sle-11-x86_64 | No | Yes
9 | container-suseconnect:SLES11-Extras | SLES11-Extras for sle-11-x86_64 | No | Yes
10 | container-suseconnect:SLES11-SP1-Pool | SLES11-SP1-Pool for sle-11-x86_64 | No | No
11 | container-suseconnect:SLES11-SP1-Updates | SLES11-SP1-Updates for sle-11-x86_64 | No | Yes
12 | container-suseconnect:SLES11-SP2-Core | SLES11-SP2-Core for sle-11-x86_64 | No | No
13 | container-suseconnect:SLES11-SP2-Extension-Store | SLES11-SP2-Extension-Store for sle-11-x86_64 | No | Yes
14 | container-suseconnect:SLES11-SP2-Updates | SLES11-SP2-Updates for sle-11-x86_64 | No | Yes
15 | container-suseconnect:SLES11-SP3-Extension-Store | SLES11-SP3-Extension-Store for sle-11-x86_64 | No | Yes
16 | container-suseconnect:SLES11-SP3-Pool | SLES11-SP3-Pool for sle-11-x86_64 | Yes | No
17 | container-suseconnect:SLES11-SP3-Updates | SLES11-SP3-Updates for sle-11-x86_64 | Yes | Yes
[/CODE]
[*] zypper pd shows the following:

# zypper pd Refreshing service 'container-suseconnect'. Loading repository data... Reading installed packages... S | Repository | Internal Name | Name | Version | Arch | Is Base --+--------------------------------------+-------------------------+--------------------------------------------+------------+--------+-------- i | @System | SUSE_SLES | SUSE Linux Enterprise Server 11 SP3 | 11.3-1.140 | x86_64 | Yes v | SLES11-SP3-Pool for sle-11-x86_64 | SUSE_SLES | SUSE Linux Enterprise Server 11 SP3 | 11.3-1.138 | x86_64 | No v | SLES11-SP3-Updates for sle-11-x86_64 | SUSE_SLES | SUSE Linux Enterprise Server 11 SP3 | 11.3-1.201 | x86_64 | No | SLES11-SP3-Updates for sle-11-x86_64 | SUSE_SLES-SP4-migration | SUSE_SLES Service Pack 4 Migration Product | 11.3-1.4 | x86_64 | No
[] Using the curses GUI of YaST2 is not feasible in this situation, because it is not reproducible in a dockerfile. Also, the curses GUI is broken when running yast2 inside a shell spawned by docker run -ti suse/sles11sp3 bash
[
] I have tried following the guide at https://www.novell.com/support/kb/doc.php?id=7015337 without success – suse_register fails, because apparently, it is unable to pick up the subscription credentials provided to the container from the host system by the hackery that activates in zypper automatically.
[/LIST]

Obviously, the subscription active on the host system includes the “SUSE Linux Enterprise Software Development Kit 11 SP3” extension (according to https://scc.suse.com/).

Is there a way to enable the SDK repository in a container? Is there also a way that doesn’t rely on using any kind of GUIs, i.e. entirely scriptable?

All right, so just to add a tiny bit of further information, not even the GUI route works here, because the yast2 GUI doesn’t list any available add-ons. Also, I tried to manually add the repository URL for the SDK, listed on scc.suse.com in the subscriptions section, but zypper errors out with

Retrieving repository 'SLE11-SDK-SP3-Pool' metadata [|]
Permission to access 'https://updates.suse.com/repo/$RCE/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml' denied.

Abort, retry, ignore? [a/r/i/? shows all options] (a): ?

…which is not really surprising, since the repo URL doesn’t contain the required authentication parameter.

[OT]Is it possible to edit my initial post? The page footer claims so, but there’s just no “Edit” button…[/OT]

Never mind, as it turns out, at the suse_register step, I just had to give it a couple additional arguments (-a email= -a regkey-sles=), and after what felt like ages of crunching and then some, it said “Registration finished successfully,” and from then on, zypper lr shows a bunch of SDK repositories as available and enabled.

Hi michaelpetrucha,

sorry for not being here to help you in time - but OTOH, congrats to solving this problem on your own and thank you for sharing the solution!

Regards,
Jens

I’ve just come out of a Hands-on with Docker session at SUSECon and was able to ask some questions afterwards. The Docker image should have access to the same repositories that the Docker host has access to so does the Docker host have access to the SDK Pool and Updates repositories? Things are more easier if you’re pointing your Docker host at a local SMT/SUSE Manager instance for SUSE repositories than directly to the SUSE Customer Center although the latter should still be possible and work.

HTH.