From a40b7d3c07fd53db5f36bcac5f614bb8062e9723 Mon Sep 17 00:00:00 2001 From: Adphi Date: Tue, 26 Apr 2022 14:59:33 +0200 Subject: [PATCH] d2vm: fix CentOS install Signed-off-by: Adphi --- README.md | 7 ++----- templates/centos.Dockerfile | 5 ++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a249446..d891910 100644 --- a/README.md +++ b/README.md @@ -32,16 +32,13 @@ Working and tested: - [x] Ubuntu - [x] Debian - [x] Alpine - -Need fix: - -- [ ] CentOS +- [x] CentOS Unsupported: - [ ] RHEL -The program use the `/etc/os-release` file to discover the Linux distribution and install the Kernel, +The program uses the `/etc/os-release` file to discover the Linux distribution and install the Kernel, if the file is missing, the build cannot succeed. Obviously, **Distroless** images are not supported. diff --git a/templates/centos.Dockerfile b/templates/centos.Dockerfile index e245c10..c0aa0d0 100644 --- a/templates/centos.Dockerfile +++ b/templates/centos.Dockerfile @@ -7,7 +7,10 @@ RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \ RUN yum update -y -RUN yum install -y kernel systemd sudo +RUN yum install -y kernel systemd NetworkManager e2fsprogs sudo && \ + systemctl enable NetworkManager && \ + systemctl unmask systemd-remount-fs.service && \ + systemctl unmask getty.target RUN dracut --no-hostonly --regenerate-all --force && \ cd /boot && \