Skip to content

Commit

Permalink
kali linux
Browse files Browse the repository at this point in the history
  • Loading branch information
buahaha authored and Adphi committed Sep 19, 2022
1 parent 6ac8591 commit c665951
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ func sysconfig(osRelease OSRelease) (string, error) {
return syslinuxCfgUbuntu, nil
case ReleaseDebian:
return syslinuxCfgDebian, nil
case ReleaseKali:
return syslinuxCfgDebian, nil
case ReleaseAlpine:
return syslinuxCfgAlpine, nil
case ReleaseCentOS:
Expand Down
6 changes: 6 additions & 0 deletions builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ func TestSyslinuxCfg(t *testing.T) {
initrd: "/initrd.img",
sysconfig: syslinuxCfgDebian,
},
{
image: "kalilinux/kali-rolling:latest",
kernel: "/vmlinuz",
initrd: "/initrd.img",
sysconfig: syslinuxCfgDebian,
},
{
image: "alpine",
kernel: "/boot/vmlinuz-virt",
Expand Down
3 changes: 3 additions & 0 deletions dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ func NewDockerfile(release OSRelease, img, password string, networkManager Netwo
case ReleaseDebian:
d.tmpl = debianDockerfileTemplate
net = NetworkManagerIfupdown2
case ReleaseKali:
d.tmpl = debianDockerfileTemplate
net = NetworkManagerIfupdown2
case ReleaseUbuntu:
d.tmpl = ubuntuDockerfileTemplate
net = NetworkManagerNetplan
Expand Down
3 changes: 3 additions & 0 deletions os_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const (
ReleaseAlpine Release = "alpine"
ReleaseCentOS Release = "centos"
ReleaseRHEL Release = "rhel"
ReleaseKali Release = "kali"
)

type Release string
Expand All @@ -44,6 +45,8 @@ func (r Release) Supported() bool {
return true
case ReleaseDebian:
return true
case ReleaseKali:
return true
case ReleaseAlpine:
return true
case ReleaseCentOS:
Expand Down

0 comments on commit c665951

Please sign in to comment.