-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.from_debian_multi
44 lines (35 loc) · 1.16 KB
/
Dockerfile.from_debian_multi
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
FROM debian:buster-slim as rawbuild
RUN apt-get update \
&& apt-get install -y \
apt-transport-https \
build-essential \
ca-certificates \
curl \
perl \
cpanminus \
libssl-dev \
zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists
RUN adduser --disabled-password --disabled-login --gecos "perl user" --home /home/perl perl
USER perl
WORKDIR /home/perl
ONBUILD COPY cpanfile cpanfile
ONBUILD RUN cpanm -n --installdeps -l /home/perl/local .
FROM rawbuild AS build
FROM debian:buster-slim
RUN apt-get update \
&& apt-get install -y \
apt-transport-https \
ca-certificates \
perl \
liblocal-lib-perl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists
RUN adduser --disabled-password --disabled-login --gecos "http2matrix user" --home /home/http2matrix http2matrix
USER http2matrix
WORKDIR /home/http2matrix
COPY --from=build /home/perl/local /home/http2matrix/local
COPY bin bin
COPY lib lib
CMD [ "/usr/bin/perl", "-I/home/http2matrix/lib","-Mlocal::lib=/home/http2matrix/local","/home/http2matrix/bin/http2matrix.pl" ]