Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1223: do not install modules with cpanm #1224

Merged
merged 1 commit into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions bin/psgi-bin/otobo.psgi
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ There are some requirements for running this application. Do something like the
in F<otobo.web.dockerfile>.

cp cpanfile.docker cpanfile
cpanm --local-lib local Carton Net::DNS Gazelle
cpanm --local-lib local --force XMLRPC::Transport::HTTP Net::Server Linux::Inotify2
cpanm --local-lib local Carton
PERL_CPANM_OPT="--local-lib /opt/otobo_install/local" carton install

=head1 Profiling
Expand Down
11 changes: 0 additions & 11 deletions otobo.web.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ ENV PATH "/opt/otobo_install/local/bin:/opt/otobo/local/bin:${PATH}"

# Install packages from CPAN into the local lib /opt/otobo_install/local.
#
# The modules Net::DNS and Gazelle take a long time to build and test.
# Install them early in a separate RUN in order to make rebuilds faster.
# TODO: go back to install via the cpanfile
#
# Found no easy way to install with --force in the cpanfile. Therefore install
# the modules with ignorable test failures with the option --force.
# TODO: go back to install via the cpanfile
#
# Note that the modules in /opt/otobo/Kernel/cpan-lib are not considered by cpanm.
# This hopefully reduces potential conflicts.
#
Expand All @@ -64,9 +56,6 @@ ENV PATH "/opt/otobo_install/local/bin:/opt/otobo/local/bin:${PATH}"
# Clean up the .cpanm dir after the installation tasks as that dir is no longer needed
# and the unpacked Perl distributions sometimes have weird user and group IDs.
WORKDIR /opt/otobo_install
RUN cpanm --local-lib local Net::DNS
RUN cpanm --local-lib local Gazelle
RUN cpanm --local-lib local --force XMLRPC::Transport::HTTP Net::Server Linux::Inotify2
RUN cpanm --local-lib local Carton
COPY cpanfile.docker cpanfile
RUN PERL_CPANM_OPT="--local-lib /opt/otobo_install/local" carton install
Expand Down