Skip to content

Commit

Permalink
Add slim image
Browse files Browse the repository at this point in the history
  • Loading branch information
redhawkeye committed May 3, 2024
1 parent 0a49e59 commit 2ab34cd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,4 @@ jobs:

- name: Build and push Docker image
run: |
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap
docker buildx build --push --platform linux/amd64,linux/arm64 -t csalab/kalilinux-docker:github -f Dockerfile .
docker buildx build --push --platform linux/amd64,linux/arm64 -t csalab/kalilinux-docker:gha-slim -f Dockerfile-slim .
39 changes: 39 additions & 0 deletions Dockerfile-slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM kalilinux/kali-rolling:latest
LABEL maintainer="[email protected]"
RUN sed -i "s/http.kali.org/mirrors.ocf.berkeley.edu/g" /etc/apt/sources.list && \
apt-get update && \
apt-get -y upgrade
RUN DEBIAN_FRONTEND=noninteractive apt-get -yq install \
sudo \
openssh-server \
python2 \
dialog \
firefox-esr \
inetutils-ping \
htop \
nano \
net-tools \
tigervnc-standalone-server \
tigervnc-xorg-extension \
tigervnc-viewer \
novnc \
dbus-x11
RUN DEBIAN_FRONTEND=noninteractive apt-get -yq install \
xfce4-goodies \
kali-desktop-xfce && \
apt-get -y full-upgrade
RUN apt-get -y autoremove && \
apt-get clean all && \
rm -rf /var/lib/apt/lists/* && \
useradd -m -c "Kali Linux" -s /bin/bash -d /home/kali kali && \
sed -i "s/#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/g" /etc/ssh/sshd_config && \
sed -i "s/off/remote/g" /usr/share/novnc/app/ui.js && \
echo "kali ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
touch /usr/share/novnc/index.htm
COPY startup.sh /startup.sh
USER kali
WORKDIR /home/kali
ENV VNC_PASSWORD=kalilinux
ENV SHELL=/bin/bash
EXPOSE 8080
ENTRYPOINT ["/bin/bash", "/startup.sh"]

0 comments on commit 2ab34cd

Please sign in to comment.