-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
67 lines (60 loc) · 1.79 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
58
59
60
61
62
63
64
65
66
67
FROM alpine:3.6
RUN apk --no-cache add \
ca-certificates
ENV HOME /home/user
RUN adduser -u 1001 -D user \
&& mkdir -p $HOME/.irssi \
&& chown -R user:user $HOME
ENV LANG C.UTF-8
ENV IRSSI_VERSION 1.1.1
RUN set -x \
&& apk add --no-cache --virtual .build-deps \
autoconf \
automake \
coreutils \
dpkg-dev dpkg \
gcc \
glib-dev \
gnupg \
libc-dev \
libtool \
lynx \
make \
ncurses-dev \
openssl \
openssl-dev \
perl-dev \
pkgconf \
tar \
&& wget "https://github.com/irssi/irssi/releases/download/${IRSSI_VERSION}/irssi-${IRSSI_VERSION}.tar.xz" -O /tmp/irssi.tar.xz \
&& wget "https://github.com/irssi/irssi/releases/download/${IRSSI_VERSION}/irssi-${IRSSI_VERSION}.tar.xz.asc" -O /tmp/irssi.tar.xz.asc \
&& export GNUPGHOME="$(mktemp -d)" \
# gpg: key DDBEF0E1: public key "The Irssi project <staff@irssi.org>" imported
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 7EE65E3082A5FB06AC7C368D00CCB587DDBEF0E1 \
&& gpg --batch --verify /tmp/irssi.tar.xz.asc /tmp/irssi.tar.xz \
&& rm -rf "$GNUPGHOME" /tmp/irssi.tar.xz.asc \
&& mkdir -p /usr/src/irssi \
&& tar -xf /tmp/irssi.tar.xz -C /usr/src/irssi --strip-components 1 \
&& rm /tmp/irssi.tar.xz \
&& cd /usr/src/irssi \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& ./configure \
--build="$gnuArch" \
--enable-true-color \
--with-bot \
--with-proxy \
--with-socks \
&& make -j "$(nproc)" \
&& make install \
&& rm -rf /usr/src/irssi \
&& runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --no-cache --virtual .irssi-rundeps $runDeps perl-libwww \
&& apk del .build-deps
WORKDIR $HOME
USER user
CMD ["irssi"]