-
Notifications
You must be signed in to change notification settings - Fork 203
Expand file tree
/
Copy pathDockerfile.bmo-slim
More file actions
70 lines (55 loc) · 2.06 KB
/
Copy pathDockerfile.bmo-slim
File metadata and controls
70 lines (55 loc) · 2.06 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
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM perl:5.44.0-slim AS builder
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
apt-file \
build-essential \
cmake \
default-libmysqlclient-dev \
git \
libcairo-dev \
libexpat-dev \
libgd-dev \
libgmp-dev \
libssl-dev \
openssl \
zlib1g-dev
RUN cpanm --notest --quiet App::cpm Module::CPANfile Carton::Snapshot
WORKDIR /app
COPY cpanfile cpanfile.snapshot /app/
# Bug #133363 for Crypt-DES: Crypt::DES fails to build with Xcode 12 [rt.cpan.org #133363]
# https://rt.cpan.org/Public/Bug/Display.html?id=133363
RUN ccflags=$(perl -MConfig -e 'print qq{$Config{ccflags} -Wno-implicit-function-declaration};'); \
cpanm -L local --notest --quiet --configure-args="ccflags='$ccflags'" Crypt::DES
# Bug #149108 for Net-IDN-Encode: [PATCH] use uvchr_to_utf8_flags instead of uvuni_to_utf8_flags (which is removed in perl 5.38.0)
# https://rt.cpan.org/Public/Bug/Display.html?id=149108
RUN cpanm -L local --notest --quiet --no-wget --from https://cpan.metacpan.org/ \
https://cpan.metacpan.org/authors/id/E/ET/ETHER/Net-IDN-Encode-2.501-TRIAL.tar.gz
RUN cpm install
# secure mail loop fixes
RUN cpm install http://s3.amazonaws.com/moz-devservices-bmocartons/third-party/Crypt-OpenPGP-1.15.tar.gz
RUN apt-file update \
&& find local -name '*.so' -exec ldd {} \; \
| egrep -v 'not.found|not.a.dynamic.executable' \
| awk '$3 {print $3}' \
| sort -u \
| xargs -IFILE apt-file search -l FILE \
| sort -u > PACKAGES
FROM perl:5.44.0-slim
ARG DEBIAN_FRONTEND=noninteractive
COPY --from=builder /app/local /app/local
COPY --from=builder /app/PACKAGES /app/PACKAGES
RUN cat /app/PACKAGES
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
git \
graphviz \
libcap2-bin \
libcmark-gfm-dev \
libcmark-gfm-extensions-dev \
rsync \
$(cat /app/PACKAGES) \
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/*
RUN useradd -u 10001 -U app -m && setcap 'cap_net_bind_service=+ep' /usr/local/bin/perl