From b575dbc89ee082d12d2995a61e27a4a8598a336a Mon Sep 17 00:00:00 2001 From: LEI WANG Date: Thu, 29 Aug 2024 17:37:01 +0800 Subject: [PATCH] control packages by release version Signed-off-by: LEI WANG --- templates/ubuntu.Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/templates/ubuntu.Dockerfile b/templates/ubuntu.Dockerfile index d634455..553aacf 100644 --- a/templates/ubuntu.Dockerfile +++ b/templates/ubuntu.Dockerfile @@ -29,19 +29,22 @@ RUN ARCH="$([ "$(uname -m)" = "x86_64" ] && echo amd64 || echo arm64)"; \ iputils-ping && \ find /boot -type l -exec rm {} \; -{{ if gt .Release.VersionID "14.04" }} +{{ if ge .Release.VersionID "14.04" }} RUN ARCH="$([ "$(uname -m)" = "x86_64" ] && echo amd64 || echo arm64)"; \ apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \ - iproute2 \ + iproute2 {{ end }} -{{ if gt .Release.VersionID "16.04" }} +{{ if ge .Release.VersionID "16.04" }} RUN ARCH="$([ "$(uname -m)" = "x86_64" ] && echo amd64 || echo arm64)"; \ apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \ systemd-sysv \ systemd +{{ end }} + +{{ if gt .Release.VersionID "16.04" }} RUN systemctl preset-all {{ end }}