PDA

View Full Version : SLES 12 SP2 Docker a SUSE Manager



ollenburg
01-Jun-2017, 12:47
Hi,
we are implementing Docker in our environment and I want to start bulding my own images/containers. The problem: how to install/update software inside my images? We are using SUSE Manager and the Docker hosts are registered against it, do not have acces neither to SCC nor a SMT. Any ideas?
Greetings
Andreas

jmozdzen
01-Jun-2017, 16:49
Hi Andreas,

you're probably referring to https://www.suse.com/documentation/sles-12/singlehtml/book_sles_docker/book_sles_docker.html#Customizing_Pre-build_Images:


The pre-built images do not have any repository configured. They contain a zypper service (https://github.com/SUSE/container-suseconnect) that contacts either the SUSE Customer Center (SCC) or your Subscription Management Tool (SMT) server, according to the configuration of the SLE host that runs the Docker container. The service obtains the list of repositories available for the product used by the Docker image.

As your docker hosts are already registered against SUSE Manager, have you tried continuing as if you had an SMT server available?

Regards,
J

ollenburg
02-Jun-2017, 07:19
Hi,

yes, I just started a container using the pre-build image and the "container-suseconnect" starting when I run a "zypper ref -s" or something similar times out. My workaround at the moment ist to delete the file "/usr/lib/zypp/plugins/services/container-suseconnect" and add the installation repo from our SUSE Manager. Then, I can at least install some software - but am unable to use the update or any other repos which require an authentication on the SUMa.

Greetings
Andreas


Hi Andreas,

you're probably referring to https://www.suse.com/documentation/sles-12/singlehtml/book_sles_docker/book_sles_docker.html#Customizing_Pre-build_Images:



As your docker hosts are already registered against SUSE Manager, have you tried continuing as if you had an SMT server available?

Regards,
J

timstein
07-Jun-2017, 08:32
Hi,

We are running into the same issue. I find it quiet annoying not being able to access the SUMa repos for our docker images. Any advice besides waiting for SUMa 3.1 would be much appreciated.

Best regards
Tim

timstein
22-Jun-2017, 13:52
The following dockerfile is working for me right now:

FROM suse/sles12sp2:latest
ADD http://smt-server-fqdn/smt.crt /etc/pki/trust/anchors/smt.crt
RUN update-ca-certificates && zypper --gpg-auto-import-keys --non-interactive patch --no-recommends --with-interactive --auto-agree-with-licenses; zypper --non-interactive update --no-recommends --with-interactive --auto-agree-with-licenses && zypper -n install --no-recommends apache2 apache2-example-pages && zypper clean && rm -rf /var/cache/zypp*
As you can see patch, update, install and clean are working, refresh does not. But please donít ask me details about all this.
The system was registered against our SMT server before we integrated it with SUSE Manager. Maybe there are essential parts left which make zypper working inside the container.