# sles15sp2 Docker Image

**URL:** https://forums.suse.com/t/sles15sp2-docker-image/35665
**Category:** SUSE Linux Enterprise Server
**Created:** [July 12, 2021, 8:51pm UTC](https://forums.suse.com/t/sles15sp2-docker-image/35665 "2021-07-12T20:51:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forums.suse.com/u/nathan)
#### Post date: [July 12, 2021, 8:51pm UTC](https://forums.suse.com/t/sles15sp2-docker-image/35665/1 "2021-07-12T20:51:13Z")

</div>

Hello,  
I am trying to build a Docker image that is based on sle15:15.2 and I am encountering a problem that produces the following error:  
`	Problem retrieving the repository index file for service 'container-suseconnect-zypp':`

I am following this [guide](https://documentation.suse.com/sles/15-SP1/html/SLES-all/docker-building-images.html#sec-docker-sle-images-customizing-the-images-sles15 "guide")

My Dockerfile is as follows:

```auto
	FROM registry.suse.com/suse/sle15:15.2
	
	RUN zypper ref -s
	RUN zypper refs && zypper refresh
	RUN zypper -n in vim

```

Build Results:

```auto
	host2-vm1:~ # docker build -t sles15sp2-test sles15sp2/
	Sending build context to Docker daemon 28.38MB
	Step 1/4 : FROM registry.suse.com/suse/sle15:15.2
	 ---> f8606f88e4d8
	Step 2/4 : RUN zypper ref -s
	 ---> Running in 5d9c7eac019e
	Refreshing service 'container-suseconnect-zypp'.
	Warning: Skipping service 'container-suseconnect-zypp' because of the above error.
	All services have been refreshed.
	Problem retrieving the repository index file for service 'container-suseconnect-zypp':
	[container-suseconnect-zypp|file:/usr/lib/zypp/plugins/services/container-suseconnect-zypp]
	Warning: There are no enabled repositories defined.
	Use 'zypper addrepo' or 'zypper modifyrepo' commands to add or enable repositories.
	The command '/bin/sh -c zypper ref -s' returned a non-zero code: 6

```

I have double checked the license status of this host on [https://scc.suse.com/subscriptions](https://scc.suse.com/subscriptions) and it appears to be in OK.

Has anyone encountered and resolved this issue or have any suggestions on resources I can use?

Thanks  
Nate

---

<div class="post-metadata">

### Author: ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)
#### Post date: [July 12, 2021, 9:44pm UTC](https://forums.suse.com/t/sles15sp2-docker-image/35665/2 "2021-07-12T21:44:58Z")

</div>

@“nathan” Hi and welcome to the Forum 🙂  
Is the SLE-Module-Containers15-SP2 added to your system as this contains the container-suseconnect package?

```auto
SUSEConnect -p sle-module-containers/15.2/x86_64
zypper install container-suseconnect

```

---

<div class="post-metadata">

### Author: ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forums.suse.com/u/nathan)
#### Post date: [July 13, 2021, 2:41pm UTC](https://forums.suse.com/t/sles15sp2-docker-image/35665/3 "2021-07-13T14:41:17Z")

</div>

Hi,  
Thank you for responding.

I have now added SLE-Module-Containers15-SP2 to the system.

```auto
	host-vm1:~ # SUSEConnect -p sle-module-containers/15.2/x86_64
	Registering system to SUSE Customer Center

	Updating system details on https://scc.suse.com ...

	Activating sle-module-containers 15.2 x86_64 ...
	-> Adding service to system ...
	-> Installing release package ...

	Successfully registered system

```

and I have installed container-suseconnect.

```auto
	host-vm1:~ # zypper install container-suseconnect
	Refreshing service 'Basesystem_Module_15_SP2_x86_64'.
	Refreshing service 'Containers_Module_15_SP2_x86_64'.
	Refreshing service 'SUSE_Linux_Enterprise_Server_15_SP2_x86_64'.
	Refreshing service 'Server_Applications_Module_15_SP2_x86_64'.
	Building repository 'SLE-Module-Containers15-SP2-Pool' cache ......................................................[done]
	Retrieving repository 'SLE-Module-Containers15-SP2-Updates' metadata ..............................................[done]
	Building repository 'SLE-Module-Containers15-SP2-Updates' cache ...................................................[done]
	Loading repository data...
	Reading installed packages...
	Resolving package dependencies...

	The following NEW package is going to be installed:
	  container-suseconnect

	1 new package to install.
	Overall download size: 3.9 MiB. Already cached: 0 B. After the operation, additional 11.3 MiB will be used.
	Continue? [y/n/v/...? shows all options] (y): y
	Retrieving package container-suseconnect-2.3.0-4.15.2.x86_64 (1/1), 3.9 MiB ( 11.3 MiB unpacked)
	Retrieving: container-suseconnect-2.3.0-4.15.2.x86_64.rpm .............................................[done (64.0 KiB/s)]

	Checking for file conflicts: ......................................................................................[done]
	(1/1) Installing: container-suseconnect-2.3.0-4.15.2.x86_64 .......................................................[done]

```

I was hoping I could now build the sles15sp2 container, but I get the same error message.

```auto
	host-vm1:~ # docker build -t sles15sp2-test sles15sp2/
	Sending build context to Docker daemon 418.4MB
	Step 1/4 : FROM registry.suse.com/suse/sle15:15.2
	 ---> f8606f88e4d8
	Step 2/4 : RUN zypper ref -s
	 ---> Running in dff587f24166
	Refreshing service 'container-suseconnect-zypp'.
	Problem retrieving the repository index file for service 'container-suseconnect-zypp':
	[container-suseconnect-zypp|file:/usr/lib/zypp/plugins/services/container-suseconnect-zypp]
	Warning: Skipping service 'container-suseconnect-zypp' because of the above error.
	All services have been refreshed.
	Warning: There are no enabled repositories defined.
	Use 'zypper addrepo' or 'zypper modifyrepo' commands to add or enable repositories.
	The command '/bin/sh -c zypper ref -s' returned a non-zero code: 6

```

Am I missing more steps or do I need to configure something differently?

Thanks again for your help.  
Nate

---

<div class="post-metadata">

### Author: ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)
#### Post date: [July 13, 2021, 9:57pm UTC](https://forums.suse.com/t/sles15sp2-docker-image/35665/4 "2021-07-13T21:57:14Z")

</div>

@nathan Hi, hmm not sure. Did you read the Announcement about the forum being closed and everything moving to [https://community.suse.com](https://community.suse.com) I wonder if you could post over there as it will get more ‘active’ eyes on it. This would be the place: [https://community.suse.com/topics/3776090](https://community.suse.com/topics/3776090)

---

<div class="post-metadata">

### Author: ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forums.suse.com/u/nathan)
#### Post date: [July 14, 2021, 1:57pm UTC](https://forums.suse.com/t/sles15sp2-docker-image/35665/5 "2021-07-14T13:57:39Z")

</div>

I had missed that announcement. Thank you for the link.
