-
Notifications
You must be signed in to change notification settings - Fork 9
Add Dockerfile for binary-com's standard perl image #1
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
Add Dockerfile for binary-com's standard perl image #1
Conversation
This is mostly derived from https://github.com/tm604/perl-docker with a few changes: - Use https://hub.docker.com/_/perl instead of building from debian:buster; this allows for source verification of both the Perl build and cpanm (which is already done on the official images) and a slightly slimmer build. - Forgo multi-stage build in favor of a smarter single-stage: we're due to install further dependencies on a later build trigger for derivative images anyway, so some core build essentials can be included here now for a batteries-included approach with less moving parts during the subsequent build triggers. - Add a sane `ENTRYPOINT` for correct behaviors when running on Kubernetes.
7beccbf
to
1d6d4ef
Compare
- Add support for using an apt cache/proxy during builds. - Rebase against debian:buster; we'd want to build our own perl that we can supply our own configuration flags in the future. - Since we build our own perl (and cpanm) ensure we're doing some basic source validation for the tarballs; embed the SHA256 sums for now, figure a better way later.
&& cd App-cpanminus-1.7044 && /opt/perl-5.32.0/bin/perl bin/cpanm . \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ | ||
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /usr/src/App-cpanminus-1.7044* /tmp/* \ | ||
# Locale support is probably quite useful in some cases, but |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still unsure whether we should keep this - clean Unicode handling is an important feature, so maybe we should enforce a .UTF-8
locale by default...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, though with the current debian:buster
base we already fall back to a C.UTF_8
locale:
root@558bed5a8132:/app# locale -a
C
C.UTF-8
POSIX
root@558bed5a8132:/app# ls /usr/lib/locale/
C.UTF-8
root@558bed5a8132:/app# locale
LANG=
LANGUAGE=
LC_ALL=
When using https://github.com/nektos/act for running tests locally, one can supply `$DEBIAN_PROXY` in .env file for act to use upon building the image. Also change the image name for consistency with Binary -> Deriv rebranding.
Use our DERIV author name on CPAN, and move perl/cpanm version info and checksums into environment variables for easy updating later.
This is mostly derived from https://github.com/tm604/perl-docker with a
few changes:
Use https://hub.docker.com/_/perl instead of building fromBuild our own perl on top ofdebian:buster; this allows for source verification of both the Perl
build and cpanm (which is already done on the official images) and a
slightly slimmer build.
https://hub.docker.com/_/debian buster.
Forgo multi-stage build in favor of a smarter single-stage: we're due
to install further dependencies on a later build trigger for
derivative images anyway, so some core build essentials can be
included here now for a batteries-included approach with less moving
parts during the subsequent build triggers.
Add a sane
ENTRYPOINT
for correct behaviors when running onKubernetes.