Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ubuntu 16.04 support #56

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions templates/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
Loading