Skip to content

Commit

Permalink
Dockerfile: invoke dumb-init on cpanm ONBUILD for signals handling
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zakame committed Jul 28, 2020
1 parent a4b1178 commit 6768804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ONBUILD RUN if [ -r /app/aptfile ]; then \
apt-get -y -q update \
&& apt-get -y -q --no-install-recommends install $(cat /app/aptfile); \
fi \
&& cpanm --notest --quiet --installdeps --with-recommends . \
&& /usr/bin/dumb-init -- cpanm --notest --quiet --installdeps --with-recommends . \
&& 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)') \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* /root/.cpanm /tmp/*

Expand Down

0 comments on commit 6768804

Please sign in to comment.