Skip to content

Commit ce41349

Browse files
committed
add kali variant of debian base
1 parent 8c8d587 commit ce41349

File tree

11 files changed

+145
-127
lines changed

11 files changed

+145
-127
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
## Readme
2525

2626
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
27-
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-debian/edit/master/readme-vars.yml).
27+
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-debian/edit/kali/readme-vars.yml).
2828

2929
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
3030
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
@@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
115115

116116
## Update the changelog
117117

118-
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-debian/tree/master/root), add an entry to the changelog
118+
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-debian/tree/kali/root), add an entry to the changelog
119119

120120
```yml
121121
changelogs:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
------------------------------
2323

24-
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-debian/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
24+
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-debian/blob/kali/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
2525

2626
------------------------------
2727

.github/workflows/external_trigger.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
external-trigger-master:
7+
external-trigger-kali:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/[email protected]
1111

1212
- name: External Trigger
13-
if: github.ref == 'refs/heads/master'
13+
if: github.ref == 'refs/heads/kali'
1414
run: |
1515
echo "**** No external release, exiting ****"
1616
echo "No external release, exiting" >> $GITHUB_STEP_SUMMARY

.github/workflows/greetings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ jobs:
99
- uses: actions/first-interaction@v1
1010
with:
1111
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
12-
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-debian/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
12+
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-debian/blob/kali/.github/PULL_REQUEST_TEMPLATE.md)!'
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/package_trigger.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
package-trigger-master:
7+
package-trigger-kali:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/[email protected]
1111

1212
- name: Package Trigger
13-
if: github.ref == 'refs/heads/master'
13+
if: github.ref == 'refs/heads/kali'
1414
run: |
15-
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER }}" ]; then
16-
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER is set; skipping trigger. ****"
17-
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
15+
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_KALI }}" ]; then
16+
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_KALI is set; skipping trigger. ****"
17+
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_KALI\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
1818
exit 0
1919
fi
20-
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-debian/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
20+
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-debian/job/kali/lastBuild/api/json | jq -r '.building') == "true" ]; then
2121
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
2222
echo "There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
2323
exit 0
2424
fi
25-
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER\". ****"
26-
echo "Package trigger running off of master branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_MASTER\`" >> $GITHUB_STEP_SUMMARY
25+
echo "**** Package trigger running off of kali branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_KALI\". ****"
26+
echo "Package trigger running off of kali branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_BASEIMAGE_DEBIAN_KALI\`" >> $GITHUB_STEP_SUMMARY
2727
response=$(curl -iX POST \
28-
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-debian/job/master/buildWithParameters?PACKAGE_CHECK=true \
28+
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-debian/job/kali/buildWithParameters?PACKAGE_CHECK=true \
2929
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
3030
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
3131
echo "**** Sleeping 10 seconds until job starts ****"

.github/workflows/permissions.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- '**/run'
66
- '**/finish'
77
- '**/check'
8+
- 'root/migrations/*'
9+
810
jobs:
911
permission_check:
1012
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1

Dockerfile

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,47 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM alpine:3.18 as rootfs-stage
3+
FROM debian:testing AS rootfs-stage
44

55
# environment
6-
ENV REL=bookworm
76
ENV ARCH=amd64
87

98
# install packages
109
RUN \
11-
apk add --no-cache \
12-
bash \
10+
apt-get update && \
11+
apt-get install -y \
1312
curl \
14-
tzdata \
15-
xz
13+
debootstrap \
14+
xz-utils
1615

17-
# grab base tarball
16+
# create base image with debootstrap
1817
RUN \
19-
mkdir /root-out && \
18+
echo "**** modify repo ****" && \
19+
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
20+
echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
2021
curl -o \
21-
/rootfs.tar.gz -L \
22-
https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-${ARCH}/${REL}/slim/rootfs.tar.xz && \
23-
tar xf \
24-
/rootfs.tar.gz -C \
25-
/root-out && \
22+
/etc/apt/trusted.gpg.d/kali-archive-keyring.asc -L \
23+
"https://archive.kali.org/archive-key.asc" && \
24+
gpg -o \
25+
/usr/share/keyrings/kali-archive-keyring.gpg --dearmor \
26+
/etc/apt/trusted.gpg.d/kali-archive-keyring.asc && \
27+
rm -f /etc/apt/sources.list.d/debian.sources && \
28+
apt-get update && \
29+
mkdir /root-out && \
30+
debootstrap \
31+
--variant=minbase \
32+
--components=main,contrib,non-free,non-free-firmware \
33+
--arch="${ARCH}" \
34+
--include=kali-archive-keyring \
35+
kali-rolling /root-out http://http.kali.org/kali && \
2636
rm -rf \
27-
/root-out/var/log/*
37+
/root-out/tmp/* \
38+
/root-out/var/lib/apt/lists/* \
39+
/root-out/var/cache/* \
40+
/root-out/var/tmp/* \
41+
/root-out/var/log/* && \
42+
echo "**** modify layer repo ****" && \
43+
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" >> /root-out/etc/apt/sources.list && \
44+
echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" >> /root-out/etc/apt/sources.list
2845

2946
# set version for s6 overlay
3047
ARG S6_OVERLAY_VERSION="3.1.6.2"
@@ -108,24 +125,15 @@ RUN \
108125
apt-utils \
109126
locales && \
110127
echo "**** install packages ****" && \
111-
apt-get install -y \
128+
apt-get install -y --no-install-recommends \
112129
catatonit \
113130
cron \
114131
curl \
115132
gnupg \
116133
jq \
134+
kali-defaults \
117135
netcat-traditional \
118136
tzdata && \
119-
echo "**** add all sources ****" && \
120-
echo "deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
121-
echo "deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
122-
echo "deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
123-
echo "deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
124-
echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
125-
echo "deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
126-
echo "deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
127-
echo "deb-src http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
128-
rm -f /etc/apt/sources.list.d/debian.sources && \
129137
echo "**** generate locale ****" && \
130138
locale-gen en_US.UTF-8 && \
131139
echo "**** create abc user and make our folders ****" && \

Dockerfile.aarch64

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,47 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM alpine:3.18 as rootfs-stage
3+
FROM debian:testing AS rootfs-stage
44

55
# environment
6-
ENV REL=bookworm
7-
ENV ARCH=arm64v8
6+
ENV ARCH=arm64
87

98
# install packages
109
RUN \
11-
apk add --no-cache \
12-
bash \
10+
apt-get update && \
11+
apt-get install -y \
1312
curl \
14-
tzdata \
15-
xz
13+
debootstrap \
14+
xz-utils
1615

17-
# grab base tarball
16+
# create base image with debootstrap
1817
RUN \
19-
mkdir /root-out && \
18+
echo "**** modify repo ****" && \
19+
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
20+
echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
2021
curl -o \
21-
/rootfs.tar.gz -L \
22-
https://github.com/debuerreotype/docker-debian-artifacts/raw/dist-${ARCH}/${REL}/slim/rootfs.tar.xz && \
23-
tar xf \
24-
/rootfs.tar.gz -C \
25-
/root-out && \
22+
/etc/apt/trusted.gpg.d/kali-archive-keyring.asc -L \
23+
"https://archive.kali.org/archive-key.asc" && \
24+
gpg -o \
25+
/usr/share/keyrings/kali-archive-keyring.gpg --dearmor \
26+
/etc/apt/trusted.gpg.d/kali-archive-keyring.asc && \
27+
rm -f /etc/apt/sources.list.d/debian.sources && \
28+
apt-get update && \
29+
mkdir /root-out && \
30+
debootstrap \
31+
--variant=minbase \
32+
--components=main,contrib,non-free,non-free-firmware \
33+
--arch="${ARCH}" \
34+
--include=kali-archive-keyring \
35+
kali-rolling /root-out http://http.kali.org/kali && \
2636
rm -rf \
27-
/root-out/var/log/*
37+
/root-out/tmp/* \
38+
/root-out/var/lib/apt/lists/* \
39+
/root-out/var/cache/* \
40+
/root-out/var/tmp/* \
41+
/root-out/var/log/* && \
42+
echo "**** modify layer repo ****" && \
43+
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" >> /root-out/etc/apt/sources.list && \
44+
echo "deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware" >> /root-out/etc/apt/sources.list
2845

2946
# set version for s6 overlay
3047
ARG S6_OVERLAY_VERSION="3.1.6.2"
@@ -108,24 +125,15 @@ RUN \
108125
apt-utils \
109126
locales && \
110127
echo "**** install packages ****" && \
111-
apt-get install -y \
128+
apt-get install -y --no-install-recommends \
112129
catatonit \
113130
cron \
114131
curl \
115132
gnupg \
116133
jq \
134+
kali-defaults \
117135
netcat-traditional \
118136
tzdata && \
119-
echo "**** add all sources ****" && \
120-
echo "deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
121-
echo "deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
122-
echo "deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
123-
echo "deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
124-
echo "deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
125-
echo "deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
126-
echo "deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
127-
echo "deb-src http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
128-
rm -f /etc/apt/sources.list.d/debian.sources && \
129137
echo "**** generate locale ****" && \
130138
locale-gen en_US.UTF-8 && \
131139
echo "**** create abc user and make our folders ****" && \

0 commit comments

Comments
 (0)