Skip to content

Commit

Permalink
Add Alpine Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
amezin committed Dec 29, 2024
1 parent fc1c679 commit a052777
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ jobs:
fail-fast: false
matrix:
include:
- image: alpine-3.18
dockerfile: alpine.dockerfile

- image: alpine-3.19
dockerfile: alpine.dockerfile

- image: alpine-3.20
dockerfile: alpine.dockerfile

- image: alpine-3.21
dockerfile: alpine.dockerfile

- image: centos-stream9
dockerfile: fedora.dockerfile

Expand Down
27 changes: 27 additions & 0 deletions alpine.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ARG base_image=alpine-3.21

FROM docker.io/library/alpine:3.21@sha256:21dc6063fd678b478f57c0e13f47560d0ea4eeba26dfc947b2a4f81f686b9f45 AS alpine-3.21
FROM docker.io/library/alpine:3.20@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a AS alpine-3.20
FROM docker.io/library/alpine:3.19@sha256:7a85bf5dc56c949be827f84f9185161265c58f589bb8b2a6b6bb6d3076c1be21 AS alpine-3.19
FROM docker.io/library/alpine:3.18@sha256:2995c82e8e723d9a5c8585cb8e901d1c50e3c2759031027d3bff577449435157 AS alpine-3.18

RUN apk add \
xvfb \
xinit \
elogind \
polkit-elogind \
mesa \
mesa-dri-gallium \
gnome-shell \
gdm \
vte3 \
vte3-gtk4 \
libhandy1 \
wl-clipboard \
&& rm -rf /var/cache/apk/*

RUN sed -i '/getty/d' /etc/inittab && \
rc-update add elogind && \
rc-update add polkit

CMD [ "/sbin/init" ]
3 changes: 2 additions & 1 deletion test/test-wayland.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi
SCRIPT_DIR=$(CDPATH="" cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)

function shutdown {
podman exec "$CID" systemctl list-units --failed || true
podman exec "$CID" sh -c 'if command -v systemctl; then systemctl list-units --failed; else rc-status; fi' || true
podman rm -f "$CID"
}

Expand Down Expand Up @@ -44,6 +44,7 @@ podman exec "$CID" gdbus wait --system --timeout=60 org.freedesktop.login1
podman exec "--user=$UID" "${ENV_VARS[@]/#/--env=}" "$CID" dbus-daemon --session --nopidfile --syslog --fork "--address=unix:path=${SHARED_DIR}/runtime/bus"
env "${ENV_VARS[@]}" dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Peer.Ping

podman exec "$CID" mkdir -m 01777 /tmp/.X11-unix
podman exec "--user=$UID" "${ENV_VARS[@]/#/--env=}" "$CID" gnome-shell --wayland --headless --sm-disable --unsafe-mode --virtual-monitor 1600x960 &

env "${ENV_VARS[@]}" gdbus wait --session --timeout=60 org.gnome.Shell.Screenshot
Expand Down
4 changes: 2 additions & 2 deletions test/test-x11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi
SCRIPT_DIR=$(CDPATH="" cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)

function shutdown {
podman exec "$CID" systemctl list-units --failed || true
podman exec "$CID" sh -c 'if command -v systemctl; then systemctl list-units --failed; else rc-status; fi' || true
podman rm -f "$CID"
}

Expand Down Expand Up @@ -45,7 +45,7 @@ podman exec "--user=$UID" "${ENV_VARS[@]/#/--env=}" "$CID" dbus-daemon --session
env "${ENV_VARS[@]}" dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Peer.Ping

mkfifo "${SHARED_DIR}/display_pipe"
podman exec "--user=$UID" "${ENV_VARS[@]/#/--env=}" "$CID" bash -c "Xvfb -screen 0 1600x960x24 -nolisten tcp -displayfd 3 3>'${SHARED_DIR}/display_pipe'" &
podman exec "--user=$UID" "${ENV_VARS[@]/#/--env=}" "$CID" sh -c "Xvfb -screen 0 1600x960x24 -nolisten tcp -displayfd 3 3>'${SHARED_DIR}/display_pipe'" &

read -r DISPLAY_NUMBER <"${SHARED_DIR}/display_pipe"

Expand Down

0 comments on commit a052777

Please sign in to comment.