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' ```