2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2024-11-21 15:26:24 +00:00

add ubuntu 16.04 support

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2024-08-23 14:57:10 +02:00 committed by Adphi
parent e31bc93074
commit d8ee37833e
2 changed files with 7 additions and 1 deletions

View File

@ -91,7 +91,11 @@ func NewDockerfile(release OSRelease, img, password string, networkManager Netwo
net = NetworkManagerIfupdown2
case ReleaseUbuntu:
d.tmpl = ubuntuDockerfileTemplate
net = NetworkManagerNetplan
if release.VersionID < "18.04" {
net = NetworkManagerIfupdown2
} else {
net = NetworkManagerNetplan
}
case ReleaseAlpine:
d.tmpl = alpineDockerfileTemplate
net = NetworkManagerIfupdown2

View File

@ -25,7 +25,9 @@ RUN ARCH="$([ "$(uname -m)" = "x86_64" ] && echo amd64 || echo arm64)"; \
iputils-ping && \
find /boot -type l -exec rm {} \;
{{ if gt .Release.VersionID "16.04" }}
RUN systemctl preset-all
{{ end }}
{{ if .Password }}RUN echo "root:{{ .Password }}" | chpasswd {{ end }}