-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (53 loc) · 1.59 KB
/
Dockerfile
File metadata and controls
58 lines (53 loc) · 1.59 KB
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 debian:trixie AS base
WORKDIR /usr/src/app
RUN apt-get update \
&& apt-get install -y \
apt-transport-https \
ca-certificates \
gnupg \
wget \
&& mkdir -p /etc/apt/keyrings \
&& wget https://ftp.indexdata.com/debian/indexdata.asc -O /etc/apt/keyrings/indexdata.asc \
&& echo 'deb [signed-by=/etc/apt/keyrings/indexdata.asc] https://ftp.indexdata.com/debian trixie main' > /etc/apt/sources.list.d/indexdata.list \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
build-essential \
gcc \
libexpat1-dev \
libyaz5-dev \
yaz \
libparams-validationcompiler-perl \
libxml-simple-perl \
libmarc-xml-perl \
libcpanel-json-xs-perl \
libwww-perl \
liblwp-protocol-https-perl \
libhttp-cookies-perl \
libdatetime-perl \
libmarc-record-perl \
libtest-differences-perl \
libxml-xslt-perl \
&& cpan Mozilla::CA \
&& cpan Unicode::Diacritic::Strip \
&& cpan Net::Z3950::PQF \
&& cpan Net::Z3950::ZOOM \
&& cpan Net::Z3950::SimpleServer
FROM base AS test
COPY Makefile.PL .
COPY etc/ etc/
COPY lib/ lib/
COPY t/ t/
RUN perl Makefile.PL \
&& make test
FROM base AS runtime
RUN apt-get autoremove -y --purge \
build-essential \
gcc \
gnupg \
wget \
&& rm -rf /var/lib/apt/lists/* /tmp/* /root/.cpanm/
COPY . .
EXPOSE 9997
# Since we often run under Kubernetes, which probes the port repeatedly, session-logging becomes noise, hence -v-session
CMD ["perl", "-I", "lib", "bin/z2folio", "-c", "etc/config", "--", "-f", "etc/yazgfs.xml", "-v-session"]