2016-09-19 21:12:06 +02:00
|
|
|
FROM alpine:latest
|
2015-06-09 15:54:33 +02:00
|
|
|
|
2016-04-19 04:55:37 +02:00
|
|
|
RUN apk --no-cache add \
|
|
|
|
ca-certificates
|
2015-06-09 15:54:33 +02:00
|
|
|
|
|
|
|
ENV HOME /home/user
|
2016-04-19 04:55:37 +02:00
|
|
|
RUN adduser -u 1001 -D user \
|
2015-06-09 15:54:33 +02:00
|
|
|
&& mkdir -p $HOME/.irssi \
|
|
|
|
&& chown -R user:user $HOME
|
|
|
|
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
|
2016-10-08 08:31:44 +02:00
|
|
|
ENV IRSSI_VERSION 0.8.20
|
2016-04-19 04:55:37 +02:00
|
|
|
ENV LIB_OTR_VERSION 4.1.1
|
|
|
|
ENV IRSSI_OTR_VERSION 1.0.1
|
|
|
|
ENV PATCH_FOR_IRSSI_OTR https://github.com/cryptodotis/irssi-otr/commit/d03ab59b6f27142c1c5e99fedc635a589b1607bb.diff
|
2015-06-09 15:54:33 +02:00
|
|
|
|
2016-04-19 04:55:37 +02:00
|
|
|
RUN set -x \
|
|
|
|
&& apk add --no-cache --virtual .build-deps \
|
2015-06-09 15:54:33 +02:00
|
|
|
autoconf \
|
|
|
|
automake \
|
2016-09-21 02:31:29 +02:00
|
|
|
curl \
|
2016-04-19 04:55:37 +02:00
|
|
|
gcc \
|
|
|
|
glib-dev \
|
|
|
|
gnupg \
|
|
|
|
libc-dev \
|
|
|
|
libgcrypt-dev \
|
2015-06-09 15:54:33 +02:00
|
|
|
libtool \
|
|
|
|
lynx \
|
|
|
|
make \
|
2016-04-19 04:55:37 +02:00
|
|
|
ncurses-dev \
|
|
|
|
openssl-dev \
|
|
|
|
patch \
|
|
|
|
perl-dev \
|
|
|
|
pkgconf \
|
|
|
|
tar \
|
|
|
|
xz \
|
2016-09-21 02:31:29 +02:00
|
|
|
&& curl -sSL "https://github.com/irssi/irssi/releases/download/${IRSSI_VERSION}/irssi-${IRSSI_VERSION}.tar.xz" -o /tmp/irssi.tar.xz \
|
|
|
|
&& curl -sSL "https://github.com/irssi/irssi/releases/download/${IRSSI_VERSION}/irssi-${IRSSI_VERSION}.tar.xz.asc" -o /tmp/irssi.tar.xz.asc \
|
2016-04-19 04:55:37 +02:00
|
|
|
&& export GNUPGHOME="$(mktemp -d)" \
|
|
|
|
# gpg: key DDBEF0E1: public key "The Irssi project <staff@irssi.org>" imported
|
2016-12-02 21:02:40 +01:00
|
|
|
&& gpg --no-tty --keyserver ha.pool.sks-keyservers.net --recv-keys 7EE65E3082A5FB06AC7C368D00CCB587DDBEF0E1 \
|
2016-04-19 04:55:37 +02:00
|
|
|
&& gpg --batch --verify /tmp/irssi.tar.xz.asc /tmp/irssi.tar.xz \
|
|
|
|
&& rm -r "$GNUPGHOME" /tmp/irssi.tar.xz.asc \
|
|
|
|
&& mkdir -p /usr/src \
|
|
|
|
&& tar -xJf /tmp/irssi.tar.xz -C /usr/src \
|
|
|
|
&& rm /tmp/irssi.tar.xz \
|
|
|
|
&& ( \
|
|
|
|
cd /usr/src/irssi-$IRSSI_VERSION \
|
|
|
|
&& ./configure \
|
|
|
|
--enable-true-color \
|
|
|
|
--with-bot \
|
|
|
|
--with-proxy \
|
|
|
|
--with-socks \
|
|
|
|
--prefix=/usr \
|
|
|
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
|
|
|
&& make install \
|
|
|
|
) \
|
2016-09-21 02:31:29 +02:00
|
|
|
&& curl -sSL "https://otr.cypherpunks.ca/libotr-${LIB_OTR_VERSION}.tar.gz" -o /tmp/libotr.tar.gz \
|
|
|
|
&& curl -sSL "https://otr.cypherpunks.ca/libotr-${LIB_OTR_VERSION}.tar.gz.asc" -o /tmp/libotr.tar.gz.asc \
|
2016-04-19 04:55:37 +02:00
|
|
|
&& export GNUPGHOME="$(mktemp -d)" \
|
|
|
|
# gpg: key 42C2ABAD: public key "OTR Dev Team (Signing Key) <otr@cypherpunks.ca>" imported
|
2016-12-02 21:02:40 +01:00
|
|
|
&& gpg --no-tty --keyserver pgp.mit.edu --recv-keys 22DF3305DF56667CE15784FCF24DE08F42C2ABAD \
|
2016-04-19 04:55:37 +02:00
|
|
|
&& gpg --batch --verify /tmp/libotr.tar.gz.asc /tmp/libotr.tar.gz \
|
|
|
|
&& rm -r "$GNUPGHOME" /tmp/libotr.tar.gz.asc \
|
2015-08-25 18:56:18 +02:00
|
|
|
&& mkdir -p /usr/src/libotr \
|
|
|
|
&& tar -xzf /tmp/libotr.tar.gz -C /usr/src/libotr --strip-components 1 \
|
2016-04-19 04:55:37 +02:00
|
|
|
&& rm /tmp/libotr.tar.gz \
|
|
|
|
&& ( \
|
|
|
|
cd /usr/src/libotr \
|
|
|
|
&& ./configure \
|
|
|
|
--with-pic \
|
|
|
|
--prefix=/usr \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
) \
|
|
|
|
&& mkdir -p /usr/src/irssi-otr \
|
2016-09-21 02:31:29 +02:00
|
|
|
&& curl -sSL "https://github.com/cryptodotis/irssi-otr/archive/v${IRSSI_OTR_VERSION}.tar.gz" -o /tmp/irssi-otr.tar.gz \
|
2015-08-25 18:56:18 +02:00
|
|
|
&& mkdir -p /usr/src/irssi-otr \
|
2016-04-19 04:55:37 +02:00
|
|
|
&& tar -xf /tmp/irssi-otr.tar.gz -C /usr/src/irssi-otr --strip-components 1 \
|
|
|
|
&& rm /tmp/irssi-otr.tar.gz \
|
|
|
|
&& ( \
|
|
|
|
cd /usr/src/irssi-otr \
|
2016-09-21 02:31:29 +02:00
|
|
|
&& curl -sSL "$PATCH_FOR_IRSSI_OTR" -o patch.diff \
|
2016-04-19 04:55:37 +02:00
|
|
|
&& patch -p1 < patch.diff \
|
|
|
|
&& ./bootstrap \
|
|
|
|
&& ./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
) \
|
|
|
|
&& rm -rf /usr/src/irssi-$IRSSI_VERSION \
|
|
|
|
&& rm -rf /usr/src/libotr \
|
|
|
|
&& rm -rf /usr/src/irssi-otr \
|
|
|
|
&& runDeps="$( \
|
|
|
|
scanelf --needed --nobanner --recursive /usr \
|
|
|
|
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
|
|
|
| sort -u \
|
|
|
|
| xargs -r apk info --installed \
|
|
|
|
| sort -u \
|
|
|
|
)" \
|
|
|
|
&& apk add --no-cache --virtual .irssi-rundeps $runDeps perl-libwww \
|
|
|
|
&& apk del .build-deps
|
2015-06-09 15:54:33 +02:00
|
|
|
|
|
|
|
WORKDIR $HOME
|
2016-04-19 04:55:37 +02:00
|
|
|
VOLUME $HOME/.irssi
|
2015-06-09 15:54:33 +02:00
|
|
|
|
|
|
|
USER user
|
|
|
|
CMD ["irssi"]
|