From 48e073541fcff959e151af848611151261c91183 Mon Sep 17 00:00:00 2001 From: fdobad <29801096+fdobad@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:36:06 -0300 Subject: [PATCH] podman clipboard fix --- Dockerfile | 9 +++++---- readme.md | 7 +++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 427873a..4a03d09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,13 @@ FROM php:cli WORKDIR /app -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - libonig-dev xclip xsel wl-clipboard +RUN apt-get update && \ + apt-get install -y --no-install-recommends libonig-dev xclip xsel wl-clipboard && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* RUN docker-php-ext-install mbstring COPY ./h-m-m . -CMD ./h-m-m $file +ENTRYPOINT ["./h-m-m"] diff --git a/readme.md b/readme.md index ff832c0..a45251e 100644 --- a/readme.md +++ b/readme.md @@ -322,8 +322,11 @@ It's also possible to execute `h-m-m` through docker (or podman): # Build the image docker build -t hmm . -# Run it -docker run --rm -it -v $(pwd):/app/ hmm +# Run it (mount $pwd for file access, X11 & DISLAY for clipboard access) +docker run --rm -it -v $(pwd):/app/ -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY hmm + +# Convinience +alias hmm='docker run --rm -it -v $(pwd):/app/ -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY hmm' ```