Skip to content

Latest commit

 

History

History
83 lines (56 loc) · 4.49 KB

File metadata and controls

83 lines (56 loc) · 4.49 KB

Great question.

While Debian/Ubuntu are the default and easiest for Jenkins, you can absolutely use CentOS, Red Hat, or even Arch Linux, but each comes with trade-offs, especially when it comes to LXC containers in Proxmox.


🧱 OPTION 1: CentOS / Red Hat-based LXC Containers

TL;DR: Avoid CentOS/RHEL in LXC if possible, unless you really need it. Use a VM instead.

⚠️ CentOS in LXC – Potential Problems

  • CentOS/RHEL is not LXC-friendly out of the box.
  • Systemd may not behave properly inside unprivileged LXCs.
  • Docker often has issues inside RHEL-based LXC (requires nesting and special tweaks).
  • Fewer prebuilt templates available in Proxmox (pveam doesn’t list CentOS templates anymore as of newer Proxmox versions).

✅ If you still want to try:

  1. Use a privileged container

    • Uncheck “Unprivileged Container” when creating it.
  2. Enable nesting

    pct set 900 -features nesting=1
  3. Use a CentOS 7/8 image manually:

    • Download from Linux Containers Images

    • Import into Proxmox:

      wget https://uk.lxd.images.canonical.com/images/centos/7/amd64/default/20230610_07:08/rootfs.tar.xz
      tar -I 'xz' -cf centos-7.tar.gz rootfs.tar.xz
      pveam add local centos-7.tar.gz

⚠️ Still, a VM is the recommended way to run CentOS or RHEL-based systems for Jenkins.


💻 OPTION 2: VMs – Recommended Distros by Use Case

Here’s a breakdown of distros you can safely run Jenkins on in a VM, and when to use them:

Distro Use Case Pros Cons
Ubuntu Server (22.04/24.04 LTS) Default choice Stable, huge community, Jenkins + Docker support out-of-the-box None
Debian (12 Bookworm) Stability-focused setups Lightweight, stable, ideal for production Slightly slower package updates
CentOS Stream 9 RHEL compatibility RHEL-compatible, upstream of RHEL Less stable than RHEL, LXC issues
Rocky Linux / AlmaLinux Free RHEL clones 1:1 RHEL downstream, long support cycle Slower adoption of bleeding-edge features
Arch Linux Bleeding-edge builds, CI experiments Latest packages, great for dev/test Not stable for long-term production Jenkins
Fedora Server Developer environments Modern systemd, SELinux enabled Shorter support lifecycle (~13 months)
openSUSE Leap / Tumbleweed Unique ecosystem YaST, Zypper, good enterprise support Less Jenkins ecosystem documentation

🎯 Recommendations Summary

Setup Recommendation
LXC Container Stick to Ubuntu 22.04 / Debian 12 for best support
VM (Jenkins Server) Use Ubuntu, Debian, Rocky Linux, or AlmaLinux
Arch/Fedora/openSUSE Only for dev environments or if you're familiar with the ecosystem
CentOS in LXC Not recommended unless you're doing it for learning purposes only

🔧 Pro Tips

  • For Jenkins with Docker builds, pick a distro with stable Docker support (Ubuntu/Rocky).
  • If you're using Jenkins agents/nodes, it's okay to use Arch or Fedora as agents if you want bleeding-edge tooling.
  • If you're using Ansible, Ubuntu/Debian or RHEL-based systems are well-supported for automation.

Let me know:

  • Would you like a Jenkins setup guide specifically for Rocky Linux / RHEL?
  • Or are you looking for a hardened Jenkins setup with Docker-in-Docker (DinD) support?

I can also generate the cloud-init or VM templates for specific distros if needed.