diff --git a/Dockerfile b/Dockerfile index 7a24c5c..1e11003 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ - locales \ + locales \ && rm -rf /var/lib/apt/lists/* ARG URL='https://media.codeweavers.com/pub/crossover/cxlinux/demo/crossover_23.5.0-1.deb' RUN curl -o /co.deb "$URL" @@ -57,5 +57,5 @@ RUN passwd -d root && useradd -md /app/ app USER app ENV NO_AT_BRIDGE=1 \ LANG=fr_FR.UTF-8 \ - PATH="/opt/cxoffice/bin/:$PATH" -CMD ["/opt/cxoffice/bin/crossover"] + PATH="/app/bin/:/opt/cxoffice/bin/:$PATH" +CMD ["crossover"] diff --git a/bin/install.sh b/bin/install.sh index 8e1e1f6..9029a0e 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -1,7 +1,11 @@ #!/bin/bash -e -cat <> "$HOME/.bashrc" -export FAKETIME='$(date '+%Y-%m-%d 00:00:00')' -EOF +su - -c "chown app: '$HOME'" +#cat <> "$HOME/.bashrc" +#export FAKETIME='$(date '+%Y-%m-%d 00:00:00')' +#EOF +ln -sf /app/.cxoffice/Microsoft_Office_2016/desktopdata/cxmenu/Shortcuts/cxoffice-fe00-*-1697392954.excel /app/bin/excel +ln -sf /app/.cxoffice/Microsoft_Office_2016/desktopdata/cxmenu/Shortcuts/cxoffice-fe00-*-1697392954.powerpnt /app/bin/powerpoint +ln -sf /app/.cxoffice/Microsoft_Office_2016/desktopdata/cxmenu/Shortcuts/cxoffice-fe00-*-1697392954.winword /app/bin/word exec "$@" diff --git a/run b/excel similarity index 91% rename from run rename to excel index ceeac8b..a4683ab 100755 --- a/run +++ b/excel @@ -14,7 +14,6 @@ fi "${CRI[@]}" run --rm --name office \ "${CRI_OPT[@]}" \ --network=none \ - --userns=keep-id \ --ipc=host \ --device /dev/dri/ \ -e DISPLAY \ @@ -25,4 +24,4 @@ fi -v "$PWD:/mnt/:ro" \ -v office:/app/ \ office \ - /opt/cxoffice/bin/crossover + excel diff --git a/install.sh b/install.sh index a297ea5..8b3bd24 100755 --- a/install.sh +++ b/install.sh @@ -18,7 +18,6 @@ fi "${CRI[@]}" build -t office . "${CRI[@]}" run --rm --name office \ "${CRI_OPT[@]}" \ - --userns=keep-id \ --ipc=host \ --device /dev/dri/ \ -e DISPLAY \ @@ -27,7 +26,7 @@ fi -v "$XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR" \ -v /usr/share/fonts/:/usr/share/fonts/:ro \ -v "$PWD:/mnt/:ro" \ - -v office:/home/app/ \ + -v office://app/ \ --entrypoint install.sh \ office \ /opt/cxoffice/bin/cxinstaller diff --git a/powerpoint b/powerpoint new file mode 100755 index 0000000..74b6e0e --- /dev/null +++ b/powerpoint @@ -0,0 +1,27 @@ +#!/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 \ + --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 \ + powerpoint diff --git a/word b/word new file mode 100755 index 0000000..2440b14 --- /dev/null +++ b/word @@ -0,0 +1,27 @@ +#!/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 \ + --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 \ + word