Closed floschmied closed 5 years ago
https://github.com/lxc/lxc-ci/blob/master/images/centos.yaml
That's what we use for the official images. @monstermunchkin may want to tweak the examples a bit.
Yes, I can tweak the example and fix networking in the container.
I don't have access to a CentOS 7.5 image, but a CentOS 7.6 image boots perfectly without having to change anything.
Hi,
Stéphane, thank you very much for that link. Yes, this file looks a way better than the default one. I will test it, if it is working for me for CentOS 7.5.
Thomas, which centos.yaml file have you used for CentOS 7.6? The one from distrobuilder or the one from Stéphanes link?
I used the CentOS example we provide, but added systemd to the package list. You're right, that it doesn't boot without it. I'll fix that.
Using the yaml file we use for our official images, everything works. It boots and provides networking.
I will also update our example to make networking work out of the box.
Hi Thomas,
thank you very much!
Perhaps you can help me with one more issue I have? I want to inject our own CentOS repository before the packages will be installed in yaml file or packages should be used from CD-Rom, but it should not be installed from internet repo. I have tried with trigger pre-packages, but this is not available.
Is there a possibility to do this?
Yes, there is a kind of pre-packages trigger called post-unpack
. Perhaps that's what you're looking for.
Hi,
thank you very much. That worked!
Hi,
two days ago, I have followed the howto to build distrobuilder and make my own centos 7.5 image. I needed 7.5, because the application I want to install is not yet compatible to 7.6...
Building the image was successfully, but it was not able to start. I got this error:
My second problem: After fixing first issue, I saw, that the image is missing two important templates:
Here is my centos.yaml file:
My fix for the first problem (image is not bootable):
197 yum --installroot=/rootfs --disablerepo=* --enablerepo=cdrom -y --releasever=%s install basesystem centos-release yum systemd binutils crontabs dhclient glibc-common iputils json logrotate openssh-clients openssh-server passwd rpm-python rsyslog tzdata vim-minimal policycoreutils json-c audit authconfig file postfix gettext net-tools rootfiles
Maybe not all of them are necessary, but most of them are. At least systemd was missing
My fix for the second problem (no networing inside contianer):
With this, I also have networking inside the container.
What I have seen, is, that there have been quite a lot changes in the last two weeks to these files:
BR Florian Schmid