{"id":28413859,"url":"https://github.com/moltar/docker.perl-app","last_synced_at":"2025-08-20T08:12:25.268Z","repository":{"id":21575783,"uuid":"24895686","full_name":"moltar/docker.perl-app","owner":"moltar","description":" Docker image for Perl projects","archived":false,"fork":false,"pushed_at":"2015-02-22T19:51:14.000Z","size":188,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-22T22:34:47.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://registry.hub.docker.com/u/moltar/perl-app/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moltar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-07T15:02:52.000Z","updated_at":"2017-10-24T16:45:17.000Z","dependencies_parsed_at":"2022-08-21T18:01:14.195Z","dependency_job_id":null,"html_url":"https://github.com/moltar/docker.perl-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moltar/docker.perl-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moltar%2Fdocker.perl-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moltar%2Fdocker.perl-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moltar%2Fdocker.perl-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moltar%2Fdocker.perl-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moltar","download_url":"https://codeload.github.com/moltar/docker.perl-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moltar%2Fdocker.perl-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271285506,"owners_count":24732923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-03T06:09:38.307Z","updated_at":"2025-08-20T08:12:25.261Z","avatar_url":"https://github.com/moltar.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Docker image for Perl projects ##\n\nThis is an all inclusive Docker image that will get your project running very quickly in a production-ready environment.\n\nThe image is not meant to be used directly, but to be inherited from. \n\nIt mostly targets the final, production builds, as the build process is too long for quick development iterations. A fresh Perl version is compiled on every build. This image is perfectly suitable for your final CI build step, after which the final image is pushed somewhere for release.\n\nThis image is available as a trusted build in [Docker Hub](https://registry.hub.docker.com/u/moltar/perl-app/).\n\n### plenv ###\n\nThe image uses [plenv](https://github.com/tokuhirom/plenv) to manage Perl versions. It will read `.perl-version` file from the root of your project directory to get the Perl version to compile.  This file is usually the result of calling `plenv local $PERL_VERSION` in your project root and it is recommended.\n\nIf no such file is present, build script will assume and install the latest Perl version, as reported by `plenv install --list` command.\n\n### Carton ###\n\nIf your project uses [Carton](https://metacpan.org/pod/Carton), it will be detected and used to install dependencies during Docker image build. Additionally, the build script will try to detect if you have used `carton bundle` and install modules with `--cached` flag, which will significantly speed up the build.\n\nIf your project does not use Carton, the build script will simply try to install dependencies via `cpanm --installdeps .` command into the Perl's module directory, rather than `local::lib`.\n\n### Build Hooks ###\n\nAdditionally, there are build hooks defined that you can use. If the build script finds these executables in your project root, they will be called.\n\n#### ./before_build ####\n\nAs the name suggest, this is called before the build of your project. However, for convenience, it is actually called after Perl is installed. Which means this script can be a regular Perl script if you wish, or Bash, or any other. This hook is useful for installing system pre-reqs for building Perl modules.\n\n#### ./after_build ####\n\nThis, of course, is called after the build. It can be used to do general clean up, asset building, etc.\n\n## Usage ##\n\nCreate the following files in the same directory or [check out the example repository on GitHub](https://github.com/moltar/docker.perl-app.example).\n\n### Files ###\n\n#### Dockerfile ####\n\n```\nFROM moltar/perl-app:latest\nENV PLACK_SERVER HTTP::Server::PSGI\nCMD [\"plackup\"]\nEXPOSE 5000\n```\n\n#### app.psgi ####\n\n```\n#!/usr/bin/env perl\n\nmy $app = sub {\n    return [200, [], ['Hello World!']];\n};\n```\n\n#### cpanfile ####\n\n```\nrequires 'Plack';\n```\n\n### Building Docker image ###\n\n```\ncd perl-project-dir\nplenv local 5.20.4\ndocker build -t my-perl-project .\ndocker run my-perl-project\n```\n\n## SSH ##\n\nThis image is ultimately based on [phusion/baseimage](https://github.com/phusion/baseimage-docker) image, which in turn enables SSH by default. If this is not desired, see instructions on how to [disable SSH](https://github.com/phusion/baseimage-docker#disabling-ssh).\n\n## Tips ##\n\n### .dockerignore ###\n\nUse a `.dockerignore` file to ignore directories that do not need to be part of the image. These directories should be `.git`, `local` (if you are using Carton), possibly other non-Perl project directories. Excluding these will, first of all, prevent you from accidentally sharing something you don't want to share. And also will make your final Docker image smaller.\n\n### .perl-version ###\n\nIf you are using Carton for dependency management, it is highly recommended to explicitly set your Perl version in `.perl-version`. You will run into problems installing dependencies in production, when your production Perl version is different from your development. This is a very common pitfall.\n\n## See Also ##\n\n* [moltar/plenv](https://registry.hub.docker.com/u/moltar/plenv/)\n* [phusion/baseimage](https://github.com/phusion/baseimage-docker)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoltar%2Fdocker.perl-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoltar%2Fdocker.perl-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoltar%2Fdocker.perl-app/lists"}