summaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: a19ad39794ff3b72de14b53687c8e9c2e72bfaf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM arm32v7/fedora:34
MAINTAINER http://fedoraproject.org/wiki/Cloud

# Set the timezone (for logs and history of poezio)
# Comment this line to use UTC timezone
ENV TZ="Europe/Paris"


RUN dnf -y update && dnf clean all
RUN dnf -y install dnf-plugins-core && dnf clean all


# Add non-official repository
RUN dnf -y copr enable fantom/poezio-omemo &&  \
    dnf repolist all


# Add non-official CA to connect to the server
#
# If you want an account on casperlefantom.net, visit the website
# https://chat.casperlefantom.net to create account, then you can
# login with any client, and you can enable OMEMO for end-to-end
# encryption.
#
# or create new account on jabber.fr provider
RUN curl -o /etc/pki/ca-trust/source/anchors/root.pem https://dl.casperlefantom.net/pub/ssl/root.pem &&  \
    /usr/bin/update-ca-trust

# Checksum of server's certificate is available here:
# https://dl.casperlefantom.net/pub/ssl/fingerprint-for-poezio-client.txt
# http://uhxfe4e6yc72i6fhexcpk4ph4niueexpy4ckc3wapazxqhv4isejbnyd.onion/pub/ssl/fingerprint-for-poezio-client.txt


RUN dnf -y install poezio        \
                   poezio-omemo  \
&& dnf clean all


# Create user to run process as non-root
RUN useradd -m -s /bin/sh poezio-user
RUN mkdir -p /home/poezio-user/.config/poezio               \
             /home/poezio-user/.local/share/poezio &&       \
chown -R poezio-user:poezio-user /home/poezio-user/.config  \
                                 /home/poezio-user/.local

# Switching to non-root user
USER poezio-user
WORKDIR /home/poezio-user/


VOLUME ["/home/poezio-user/.config/poezio", "/home/poezio-user/.local/share/poezio"]
CMD ["/usr/bin/poezio"]