From 6b448af6cb9d10abda4b0115854fc1498ff7a294 Mon Sep 17 00:00:00 2001 From: Joerg Elfring Date: Mon, 10 Jun 2019 17:34:13 +0200 Subject: [PATCH] profanity: First and Ugly version of a profanity image w/ OMEMO support --- docker-compose.yaml | 3 +++ profanity/Dockerfile | 34 ++++++++++++++++++++++++++++++++++ profanity/README.md | 12 ++++++++++++ profanity/assets/mirrorlist | 4 ++++ profanity/assets/sudoers | 1 + 5 files changed, 54 insertions(+) create mode 100644 profanity/Dockerfile create mode 100644 profanity/README.md create mode 100644 profanity/assets/mirrorlist create mode 100644 profanity/assets/sudoers diff --git a/docker-compose.yaml b/docker-compose.yaml index c1d2e97..4cb5d22 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -15,4 +15,7 @@ services: build: ./torrelay image: elfrinjo/torrelay:latest + profanity: + build: ./profanity + image: elfrinjo/profanity:latest diff --git a/profanity/Dockerfile b/profanity/Dockerfile new file mode 100644 index 0000000..20f39c1 --- /dev/null +++ b/profanity/Dockerfile @@ -0,0 +1,34 @@ +FROM archlinux/base:latest +LABEL maintainer "J. Elfring " + +## Set faster mirrors +COPY assets/mirrorlist /etc/pacman.d/mirrorlist + +## Install prereqs and create a user with +## administrative privileges to install packages +RUN pacman --sync --refresh --needed --noconfirm \ + base-devel \ + git \ + go \ + && useradd --create-home user +COPY assets/sudoers /etc/sudoers + +## Switch to the new user and install yay from aur +USER user +RUN cd /home/user \ + && git clone https://aur.archlinux.org/yay.git \ + && cd yay \ + && makepkg --syncdeps --install --noconfirm \ + && cd /home/user \ + && rm -rf yay + +## Install profanity-git from aur +RUN cd /home/user \ + && yay --sync --noconfirm profanity-git + +## Cleanup +RUN sudo pacman --noconfirm -Rcns go yay texinfo \ + && sudo pacman --noconfirm -Rsn $(pacman -Qqdt) + +WORKDIR /home/user +CMD ["/usr/sbin/profanity"] diff --git a/profanity/README.md b/profanity/README.md new file mode 100644 index 0000000..70687d0 --- /dev/null +++ b/profanity/README.md @@ -0,0 +1,12 @@ +## Profanity XMPP Client +Docker image for running the profanity xmpp client based on Arch Linux. +Profanity is installed from aur/profanity-git. +OMEMO is available, + +## Usage +```console +# docker run -ti --rm \ + -v ~/.local/share/profanity:/home/user/.local/share/profanity + -v ~/.config/profanity/:/home/user/.config/profanity + elfrinjo/profanity:latest +``` diff --git a/profanity/assets/mirrorlist b/profanity/assets/mirrorlist new file mode 100644 index 0000000..c91a83b --- /dev/null +++ b/profanity/assets/mirrorlist @@ -0,0 +1,4 @@ +Server = http://ftp.gwdg.de/pub/linux/archlinux/$repo/os/$arch +Server = http://ftp.fau.de/archlinux/$repo/os/$arch +Server = https://ftp.fau.de/archlinux/$repo/os/$arch + diff --git a/profanity/assets/sudoers b/profanity/assets/sudoers new file mode 100644 index 0000000..304dba9 --- /dev/null +++ b/profanity/assets/sudoers @@ -0,0 +1 @@ +user ALL = NOPASSWD: ALL