From 2f9a86e020d461ec41c5d6e1f16f8896e962afbb Mon Sep 17 00:00:00 2001 From: svenssonaxel Date: Tue, 10 Apr 2018 16:07:13 -0400 Subject: [PATCH] fix skype, add fontforge, enhance keepass2 (#371) * Enable keepass2 to use plugins * Add fontforge * Let skype finish before exiting container --- fontforge/Dockerfile | 32 +++++++++++++++++++++++++++++++ keepass2/Dockerfile | 2 ++ skype/Dockerfile | 5 ++++- skype/run-skype-and-wait-for-exit | 4 ++++ 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 fontforge/Dockerfile create mode 100755 skype/run-skype-and-wait-for-exit diff --git a/fontforge/Dockerfile b/fontforge/Dockerfile new file mode 100644 index 0000000..6d65bf1 --- /dev/null +++ b/fontforge/Dockerfile @@ -0,0 +1,32 @@ +# Run Fontforge in a container +# +# state=$HOME +# mkdir -p $state/fontforge +# docker run --rm \ +# -v /tmp/.X11-unix:/tmp/.X11-unix \ +# -e DISPLAY=unix$DISPLAY \ +# -v $state/fontforge:/home/fontforge \ +# --name fontforge \ +# fghj/fontforge + +# Base docker image +FROM ubuntu:latest +LABEL maintainer "Axel Svensson " + +RUN apt-get update \ + && apt-get install -y \ + software-properties-common \ + --no-install-recommends \ + && add-apt-repository ppa:fontforge/fontforge \ + && apt-get update \ + && apt-get install -y \ + fontforge \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +ENV HOME /home/fontforge +RUN useradd --create-home --home-dir $HOME fontforge +WORKDIR $HOME +USER fontforge +CMD [ "fontforge" ] + diff --git a/keepass2/Dockerfile b/keepass2/Dockerfile index b1a1f02..53d8877 100644 --- a/keepass2/Dockerfile +++ b/keepass2/Dockerfile @@ -8,6 +8,7 @@ # docker run -it \ # -v /home/$USER/DB.kdbx:/root/DB.kdbx \ # -v /tmp/.X11-unix:/tmp/.X11-unix \ +# -v /home/$USER/keepass2-plugins:/usr/lib/keepass2/Plugins \ # -e DISPLAY=$DISPLAY \ # keepass2 "$@" # @@ -25,6 +26,7 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && apt-get install -y \ keepass2 \ xdotool \ + mono-dmcs \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* diff --git a/skype/Dockerfile b/skype/Dockerfile index 9e4453d..45a5071 100644 --- a/skype/Dockerfile +++ b/skype/Dockerfile @@ -30,6 +30,8 @@ RUN apt-get update && apt-get -y install \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* +COPY run-skype-and-wait-for-exit /usr/local/bin + # Make a user ENV HOME /home/skype RUN useradd --create-home --home-dir $HOME skype \ @@ -40,4 +42,5 @@ WORKDIR $HOME USER skype # Start Skype -ENTRYPOINT ["skypeforlinux"] +ENTRYPOINT ["run-skype-and-wait-for-exit"] + diff --git a/skype/run-skype-and-wait-for-exit b/skype/run-skype-and-wait-for-exit new file mode 100755 index 0000000..582c336 --- /dev/null +++ b/skype/run-skype-and-wait-for-exit @@ -0,0 +1,4 @@ +#!/bin/bash +skypeforlinux +sleep 3 +while ps -C skypeforlinux >/dev/null;do sleep 3;done