Skip to content

Commit a997ee7

Browse files
committed
Add XFCE and LXDE desktop variants for Debian, Kali, and Ubuntu
Mirrors UserLAnd-Assets-{Debian,Kali,Ubuntu}_{XFCE,LXDE}: installs the desktop metapackage instead of twm, and writes a ~/.vnc/xstartup that launches startxfce4/startlxde. Image names use an underscore (userland-debian_xfce) to match how OciImageFetcher/ServerService.kt in the UserLAnd app construct the OCI image name from distributionType and flavor.
1 parent 2a93441 commit a997ee7

14 files changed

Lines changed: 538 additions & 0 deletions
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build Debian LXDE
2+
3+
on:
4+
schedule:
5+
- cron: '0 12 * * 1' # every Monday 12:00 UTC (staggered)
6+
workflow_dispatch:
7+
push:
8+
branches: [master]
9+
paths:
10+
- Dockerfile.debian_lxde
11+
- 'input/**'
12+
- 'assets/common/**'
13+
- 'assets/debian/**'
14+
- 'assets/lxde/**'
15+
16+
jobs:
17+
build:
18+
uses: ./.github/workflows/build-image.yml
19+
with:
20+
image_name: userland-debian_lxde
21+
upstream_image: debian:latest
22+
dockerfile: Dockerfile.debian_lxde
23+
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386
24+
secrets: inherit
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build Debian XFCE
2+
3+
on:
4+
schedule:
5+
- cron: '0 11 * * 1' # every Monday 11:00 UTC (staggered)
6+
workflow_dispatch:
7+
push:
8+
branches: [master]
9+
paths:
10+
- Dockerfile.debian_xfce
11+
- 'input/**'
12+
- 'assets/common/**'
13+
- 'assets/debian/**'
14+
- 'assets/xfce/**'
15+
16+
jobs:
17+
build:
18+
uses: ./.github/workflows/build-image.yml
19+
with:
20+
image_name: userland-debian_xfce
21+
upstream_image: debian:latest
22+
dockerfile: Dockerfile.debian_xfce
23+
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386
24+
secrets: inherit
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build Kali LXDE
2+
3+
on:
4+
schedule:
5+
- cron: '0 14 * * 1' # every Monday 14:00 UTC (staggered)
6+
workflow_dispatch:
7+
push:
8+
branches: [master]
9+
paths:
10+
- Dockerfile.kali_lxde
11+
- 'input/**'
12+
- 'assets/common/**'
13+
- 'assets/lxde/**'
14+
15+
jobs:
16+
build:
17+
uses: ./.github/workflows/build-image.yml
18+
with:
19+
image_name: userland-kali_lxde
20+
upstream_image: kalilinux/kali-rolling:latest
21+
dockerfile: Dockerfile.kali_lxde
22+
platforms: linux/amd64,linux/arm64
23+
secrets: inherit
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build Kali XFCE
2+
3+
on:
4+
schedule:
5+
- cron: '0 13 * * 1' # every Monday 13:00 UTC (staggered)
6+
workflow_dispatch:
7+
push:
8+
branches: [master]
9+
paths:
10+
- Dockerfile.kali_xfce
11+
- 'input/**'
12+
- 'assets/common/**'
13+
- 'assets/xfce/**'
14+
15+
jobs:
16+
build:
17+
uses: ./.github/workflows/build-image.yml
18+
with:
19+
image_name: userland-kali_xfce
20+
upstream_image: kalilinux/kali-rolling:latest
21+
dockerfile: Dockerfile.kali_xfce
22+
platforms: linux/amd64,linux/arm64
23+
secrets: inherit
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build Ubuntu LXDE
2+
3+
on:
4+
schedule:
5+
- cron: '0 16 * * 1' # every Monday 16:00 UTC (staggered)
6+
workflow_dispatch:
7+
push:
8+
branches: [master]
9+
paths:
10+
- Dockerfile.ubuntu_lxde
11+
- 'input/**'
12+
- 'assets/common/**'
13+
- 'assets/lxde/**'
14+
15+
jobs:
16+
build:
17+
uses: ./.github/workflows/build-image.yml
18+
with:
19+
image_name: userland-ubuntu_lxde
20+
upstream_image: ubuntu:latest
21+
dockerfile: Dockerfile.ubuntu_lxde
22+
platforms: linux/amd64,linux/arm64,linux/arm/v7
23+
secrets: inherit
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build Ubuntu XFCE
2+
3+
on:
4+
schedule:
5+
- cron: '0 15 * * 1' # every Monday 15:00 UTC (staggered)
6+
workflow_dispatch:
7+
push:
8+
branches: [master]
9+
paths:
10+
- Dockerfile.ubuntu_xfce
11+
- 'input/**'
12+
- 'assets/common/**'
13+
- 'assets/xfce/**'
14+
15+
jobs:
16+
build:
17+
uses: ./.github/workflows/build-image.yml
18+
with:
19+
image_name: userland-ubuntu_xfce
20+
upstream_image: ubuntu:latest
21+
dockerfile: Dockerfile.ubuntu_xfce
22+
platforms: linux/amd64,linux/arm64,linux/arm/v7
23+
secrets: inherit

Dockerfile.debian_lxde

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Stage 1: build the arch-specific artifacts that must not ship with their build deps
2+
FROM debian:latest AS builder
3+
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
build-essential \
6+
busybox-static \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
COPY input/disableselinux.c /tmp/disableselinux.c
10+
RUN mkdir /build \
11+
&& gcc -shared -fPIC /tmp/disableselinux.c -o /build/libdisableselinux.so \
12+
&& cp /bin/busybox /build/busybox
13+
14+
# Stage 2: the real rootfs — no build toolchain
15+
FROM debian:latest
16+
17+
RUN printf '#!/bin/sh\nunset LD_PRELOAD\nunset LD_LIBRARY_PATH\nexport LIBGL_ALWAYS_SOFTWARE=1\n' \
18+
> /etc/profile.d/userland.sh && chmod +x /etc/profile.d/userland.sh
19+
20+
RUN apt-get update && apt-get install -y --no-install-recommends \
21+
sudo \
22+
dropbear \
23+
libgl1 \
24+
libglx-mesa0 \
25+
tightvncserver \
26+
xterm \
27+
xfonts-base \
28+
expect \
29+
wget \
30+
curl \
31+
pulseaudio \
32+
&& apt-get install -y lxde \
33+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
34+
35+
COPY --from=builder /build/busybox /support/busybox
36+
COPY --from=builder /build/libdisableselinux.so /support/libdisableselinux.so
37+
COPY assets/common/ /support/
38+
COPY assets/debian/ /support/
39+
COPY assets/lxde/ /support/
40+
41+
RUN chmod a+x /support/busybox \
42+
/support/libdisableselinux.so \
43+
/support/nosudo \
44+
/support/*.sh \
45+
&& chmod a-w /support/* \
46+
&& chmod a-w /support

Dockerfile.debian_xfce

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Stage 1: build the arch-specific artifacts that must not ship with their build deps
2+
FROM debian:latest AS builder
3+
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
build-essential \
6+
busybox-static \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
COPY input/disableselinux.c /tmp/disableselinux.c
10+
RUN mkdir /build \
11+
&& gcc -shared -fPIC /tmp/disableselinux.c -o /build/libdisableselinux.so \
12+
&& cp /bin/busybox /build/busybox
13+
14+
# Stage 2: the real rootfs — no build toolchain
15+
FROM debian:latest
16+
17+
RUN printf '#!/bin/sh\nunset LD_PRELOAD\nunset LD_LIBRARY_PATH\nexport LIBGL_ALWAYS_SOFTWARE=1\n' \
18+
> /etc/profile.d/userland.sh && chmod +x /etc/profile.d/userland.sh
19+
20+
RUN apt-get update && apt-get install -y --no-install-recommends \
21+
sudo \
22+
dropbear \
23+
libgl1 \
24+
libglx-mesa0 \
25+
tightvncserver \
26+
xterm \
27+
xfonts-base \
28+
expect \
29+
wget \
30+
curl \
31+
pulseaudio \
32+
&& apt-get install -y xfce4 dbus-x11 \
33+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
34+
35+
COPY --from=builder /build/busybox /support/busybox
36+
COPY --from=builder /build/libdisableselinux.so /support/libdisableselinux.so
37+
COPY assets/common/ /support/
38+
COPY assets/debian/ /support/
39+
COPY assets/xfce/ /support/
40+
41+
RUN chmod a+x /support/busybox \
42+
/support/libdisableselinux.so \
43+
/support/nosudo \
44+
/support/*.sh \
45+
&& chmod a-w /support/* \
46+
&& chmod a-w /support

Dockerfile.kali_lxde

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Stage 1: build the arch-specific artifacts that must not ship with their build deps
2+
FROM kalilinux/kali-rolling:latest AS builder
3+
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
build-essential \
6+
busybox-static \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
COPY input/disableselinux.c /tmp/disableselinux.c
10+
RUN mkdir /build \
11+
&& gcc -shared -fPIC /tmp/disableselinux.c -o /build/libdisableselinux.so \
12+
&& cp /bin/busybox /build/busybox
13+
14+
# Stage 2: the real rootfs — no build toolchain
15+
FROM kalilinux/kali-rolling:latest
16+
17+
ENV DEBIAN_FRONTEND=noninteractive
18+
19+
RUN printf '#!/bin/sh\nunset LD_PRELOAD\nunset LD_LIBRARY_PATH\nexport LIBGL_ALWAYS_SOFTWARE=1\n' \
20+
> /etc/profile.d/userland.sh && chmod +x /etc/profile.d/userland.sh
21+
22+
RUN apt-get update && apt-get install -y --no-install-recommends \
23+
sudo \
24+
dropbear \
25+
libgl1 \
26+
libglx-mesa0 \
27+
tightvncserver \
28+
xterm \
29+
xfonts-base \
30+
expect \
31+
wget \
32+
curl \
33+
pulseaudio \
34+
&& apt-get install -y lxde \
35+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
36+
37+
RUN sed -i 's/force_color_prompt=/#force_color_prompt=/g' /etc/skel/.bashrc
38+
39+
COPY --from=builder /build/busybox /support/busybox
40+
COPY --from=builder /build/libdisableselinux.so /support/libdisableselinux.so
41+
COPY assets/common/ /support/
42+
COPY assets/lxde/ /support/
43+
44+
RUN chmod a+x /support/busybox \
45+
/support/libdisableselinux.so \
46+
/support/nosudo \
47+
/support/*.sh \
48+
&& chmod a-w /support/* \
49+
&& chmod a-w /support

Dockerfile.kali_xfce

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Stage 1: build the arch-specific artifacts that must not ship with their build deps
2+
FROM kalilinux/kali-rolling:latest AS builder
3+
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
build-essential \
6+
busybox-static \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
COPY input/disableselinux.c /tmp/disableselinux.c
10+
RUN mkdir /build \
11+
&& gcc -shared -fPIC /tmp/disableselinux.c -o /build/libdisableselinux.so \
12+
&& cp /bin/busybox /build/busybox
13+
14+
# Stage 2: the real rootfs — no build toolchain
15+
FROM kalilinux/kali-rolling:latest
16+
17+
ENV DEBIAN_FRONTEND=noninteractive
18+
19+
RUN printf '#!/bin/sh\nunset LD_PRELOAD\nunset LD_LIBRARY_PATH\nexport LIBGL_ALWAYS_SOFTWARE=1\n' \
20+
> /etc/profile.d/userland.sh && chmod +x /etc/profile.d/userland.sh
21+
22+
RUN apt-get update && apt-get install -y --no-install-recommends \
23+
sudo \
24+
dropbear \
25+
libgl1 \
26+
libglx-mesa0 \
27+
tightvncserver \
28+
xterm \
29+
xfonts-base \
30+
expect \
31+
wget \
32+
curl \
33+
pulseaudio \
34+
&& apt-get install -y xfce4 dbus-x11 \
35+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
36+
37+
RUN sed -i 's/force_color_prompt=/#force_color_prompt=/g' /etc/skel/.bashrc
38+
39+
COPY --from=builder /build/busybox /support/busybox
40+
COPY --from=builder /build/libdisableselinux.so /support/libdisableselinux.so
41+
COPY assets/common/ /support/
42+
COPY assets/xfce/ /support/
43+
44+
RUN chmod a+x /support/busybox \
45+
/support/libdisableselinux.so \
46+
/support/nosudo \
47+
/support/*.sh \
48+
&& chmod a-w /support/* \
49+
&& chmod a-w /support

0 commit comments

Comments
 (0)