1
- FROM ubuntu:20.04 AS builder
1
+ FROM kalilinux/kali-rolling AS builder
2
2
MAINTAINER Daniel Guerra
3
3
4
4
# Install packages
5
5
6
6
ENV DEBIAN_FRONTEND=noninteractive
7
- RUN sed -i "s/# deb-src/deb-src/g" /etc/apt/sources.list
7
+ ARG DEBIAN_VERSION_FOR_MIRORR="bookworm"
8
+ RUN echo "deb-src http://http.kali.org/kali kali-rolling main non-free contrib" | tee -a /etc/apt/sources.list
9
+ RUN echo "deb http://ftp.debian.org/debian $DEBIAN_VERSION_FOR_MIRORR main" >> /etc/apt/sources.list.d/debian-$DEBIAN_VERSION_FOR_MIRORR.list
8
10
RUN apt-get -y update && apt-get -yy dist-upgrade
9
11
ENV BUILD_DEPS="git autoconf pkg-config libssl-dev libpam0g-dev \
10
12
libx11-dev libxfixes-dev libxrandr-dev nasm xsltproc flex \
11
13
bison libxml2-dev dpkg-dev libcap-dev libxkbfile-dev"
12
- RUN apt-get -yy install sudo apt-utils software-properties-common $BUILD_DEPS
14
+ ENV BUILD_DEPS2="liblirc-dev"
15
+ RUN apt-get -yy install sudo apt-utils software-properties-common $BUILD_DEPS $BUILD_DEPS2
13
16
14
17
15
18
# Build xrdp
@@ -21,7 +24,7 @@ RUN mv /tmp/pulseaudio-* /tmp/pulseaudio-11.1
21
24
WORKDIR /tmp/pulseaudio-11.1
22
25
RUN dpkg-buildpackage -rfakeroot -uc -b
23
26
WORKDIR /tmp
24
- RUN git clone --branch v0.10.0 --recursive https://github.com/neutrinolabs/xrdp.git
27
+ RUN git clone --branch devel --recursive https://github.com/neutrinolabs/xrdp.git
25
28
WORKDIR /tmp/xrdp
26
29
RUN ./bootstrap
27
30
RUN ./configure
@@ -36,17 +39,17 @@ RUN make
36
39
RUN mkdir -p /tmp/so
37
40
RUN cp src/.libs/*.so /tmp/so
38
41
39
- FROM ubuntu:20.04
40
-
42
+ FROM kalilinux/kali-rolling
41
43
ARG ADDITIONAL_PACKAGES=""
42
44
ENV ADDITIONAL_PACKAGES=${ADDITIONAL_PACKAGES}
43
45
ENV TZ="Etc/UTC"
44
46
ENV DEBIAN_FRONTEND=noninteractive
45
- RUN apt update && apt install -y software-properties-common apt-utils
46
- RUN apt -y dist-upgrade && apt install -y \
47
+ COPY --from=builder /etc/ apt/sources.list.d/debian*.list /etc/apt/sources.list.d/
48
+ RUN apt update && apt -y dist-upgrade && apt install -y \
47
49
ca-certificates \
48
50
crudini \
49
- firefox \
51
+ dbus-x11 \
52
+ kali-desktop-xfce \
50
53
less \
51
54
locales \
52
55
openssh-server \
@@ -55,19 +58,9 @@ RUN apt -y dist-upgrade && apt install -y \
55
58
supervisor \
56
59
uuid-runtime \
57
60
vim \
58
- vlc \
59
61
wget \
60
62
xauth \
61
63
xautolock \
62
- xfce4 \
63
- xfce4-clipman-plugin \
64
- xfce4-cpugraph-plugin \
65
- xfce4-netload-plugin \
66
- xfce4-screenshooter \
67
- xfce4-taskmanager \
68
- xfce4-terminal \
69
- xfce4-xkb-plugin \
70
- dbus-x11 \
71
64
xorgxrdp \
72
65
xprintidle \
73
66
xrdp \
@@ -89,8 +82,9 @@ RUN cp /etc/X11/xrdp/xorg.conf /etc/X11 && \
89
82
sed -i "s/console/anybody/g" /etc/X11/Xwrapper.config && \
90
83
sed -i "s/xrdp\/ xorg/xorg/g" /etc/xrdp/sesman.ini && \
91
84
locale-gen en_US.UTF-8 && \
92
- echo "pulseaudio -D --enable-memfd=True" > /etc/skel/.Xsession && \
93
- echo "xfce4-session" >> /etc/skel/.Xsession && \
85
+ echo "#!/bin/sh" > /usr/bin/start-pulseaudio-x11 && \
86
+ echo "pulseaudio -D --enable-memfd=True" >> /usr/bin/start-pulseaudio-x11 && \
87
+ echo "xfce4-session" >> /etc/skel/.Xclients && \
94
88
cp -r /etc/ssh /ssh_orig && \
95
89
rm -rf /etc/ssh/* && \
96
90
rm -rf /etc/xrdp/rsakeys.ini /etc/xrdp/*.pem && \
0 commit comments