This repository has been archived on 2023-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
office/run
2023-10-02 18:44:35 +02:00

29 lines
919 B
Bash
Executable File

#!/bin/bash -e
CRI=(podman)
CRI_OPT=()
if [ -z "$WAYLAND_DISPLAY" ]; then
CRI_OPT+=(
-e XAUTHORITY=/app/.Xauthority
-v "$XAUTHORITY:/app/.Xauthority:ro"
)
fi
"${CRI[@]}" build -t office .
"${CRI[@]}" run --rm --name office \
"${CRI_OPT[@]}" \
--network=none \
--userns=keep-id \
--ipc=host \
--device /dev/dri/ \
-e DISPLAY \
-e XDG_RUNTIME_DIR \
-v /tmp/.X11-unix/:/tmp/.X11-unix \
-v "$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR" \
-v /usr/share/fonts/:/usr/share/fonts/:ro \
-v "$PWD:/mnt/:ro" \
-v office:/app/ \
office \
/opt/cxoffice/bin/crossover