-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.perlbuild
38 lines (29 loc) · 1.13 KB
/
Dockerfile.perlbuild
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
FROM debian:buster-slim as build
RUN apt-get update \
&& apt-get install -y \
apt-transport-https \
build-essential \
ca-certificates \
curl \
libssl-dev \
zlib1g-dev \
perl \
cpanminus \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists
RUN cpanm Perl::Build
RUN perl-build -j4 5.30.2 /opt/perl-5.30.2
RUN curl -L https://cpanmin.us | /opt/perl-5.30.2/bin/perl - App::cpanminus
COPY cpanfile cpanfile
RUN /opt/perl-5.30.2/bin/cpanm -n --installdeps .
FROM debian:buster-slim
COPY --from=build /opt/perl-5.30.2 /opt/perl-5.30.2
COPY --from=build /usr/lib/x86_64-linux-gnu/libssl* /usr/lib/x86_64-linux-gnu/
COPY --from=build /usr/lib/x86_64-linux-gnu/libcrypto* /usr/lib/x86_64-linux-gnu/
COPY --from=build /usr/lib/x86_64-linux-gnu/libz.* /usr/lib/x86_64-linux-gnu/
RUN adduser --disabled-password --disabled-login --gecos "http2matrix user" --home /home/http2matrix http2matrix
USER http2matrix
WORKDIR /home/http2matrix
COPY bin bin
COPY lib lib
CMD [ "/opt/perl-5.30.2/bin/perl","-I/home/http2matrix/lib","/home/http2matrix/bin/http2matrix.pl" ]