Skip to content

Commit 6768804

Browse files
committed
Dockerfile: invoke dumb-init on cpanm ONBUILD for signals handling
This is important for cross-compile builds (e.g. amd64 to arm64) as cpanm/perl won't handle signals without defining them in the code, cf Perl/docker-perl#44. Without this, cross-compiles will appear to stall.
1 parent a4b1178 commit 6768804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ONBUILD RUN if [ -r /app/aptfile ]; then \
6060
apt-get -y -q update \
6161
&& apt-get -y -q --no-install-recommends install $(cat /app/aptfile); \
6262
fi \
63-
&& cpanm --notest --quiet --installdeps --with-recommends . \
63+
&& /usr/bin/dumb-init -- cpanm --notest --quiet --installdeps --with-recommends . \
6464
&& apt-get purge -y -q $(perl -le'@seen{split " ", "" . do { local ($/, @ARGV) = (undef, "/app/aptfile"); <> }} = () if -r "aptfile"; print for grep { !exists $seen{$_} } qw(make gcc git openssh-client libc6-dev libssl-dev zlib1g-dev)') \
6565
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* /root/.cpanm /tmp/*
6666

0 commit comments

Comments
 (0)