This repository has been archived by the owner on Feb 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
57 lines (47 loc) · 1.69 KB
/
Dockerfile
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
53
54
55
56
57
FROM docker.io/library/openjdk:17-jdk-slim-bullseye
ENV SIGNAL_CLIENT_VERSION=0.11.0
ENV SIGNAL_CLI_VERSION ${SIGNAL_CLI_VERSION:-0.10.0}
ENV SIGNAL_CLI_HOME /var/lib/signal-cli
ENV SIGNAL_CLI_OPTS=-Xms2m
ADD src/signal-cli-$SIGNAL_CLI_VERSION.tar.gz /opt/
COPY wrapper.sh /usr/bin/signal-cli
RUN set -x && \
ls -alh /opt && \
chmod 775 /opt/signal-cli-$SIGNAL_CLI_VERSION/bin/signal-cli && \
useradd --home-dir $SIGNAL_CLI_HOME \
--password "" \
--shell /bin/bash \
--uid 99 \
--system --create-home --user-group \
signal-cli && \
apt-get update && \
apt-get install -y --no-install-recommends procps vim-tiny dbus supervisor && \
mkdir -p /etc/dbus-1/system.d \
/etc/supervisord.d \
/usr/local/share/supervisord \
/usr/share/java/signal-cli \
/var/run/dbus \
/var/run/supervisord && \
chmod 755 /usr/bin/signal-cli
COPY supervisor_share/* /usr/local/share/supervisord/
COPY src/org.asamk.Signal.conf /etc/dbus-1/system.d/
COPY listen_tcp.conf /etc/dbus-1/system.d/
# Asterisk means 0.0.0.0, which is okay here if only on one network
ARG interface_name="*"
ARG port_number=47000
RUN sed -i -e "s/%interface_name%/$interface_name/" \
-e "s/%port_number%/$port_number/" \
/etc/dbus-1/system.d/listen_tcp.conf
COPY supervisord.conf /etc/supervisord.conf
COPY debug_profile.sh /etc/profile.d/aliases.sh
RUN ( echo SIGNAL_CLI_VERSION=$SIGNAL_CLI_VERSION \
SIGNAL_CLI_OPTS=$SIGNAL_CLI_OPTS \
JAVA_HOME=$JAVA_HOME \
PATH=$PATH; \
echo export SIGNAL_CLI_VERSION SIGNAL_CLI_OPTS JAVA_HOME PATH; \
) >> /etc/profile.d/aliases.sh
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh && \
ln -s /entrypoint.sh /usr/local/bin/interact
ENTRYPOINT ["/entrypoint.sh"]
# vim:ft=dockerfile