diegok / docker-alpine-perl-devel

A Alpine-based image suitable for project building

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alpine-perl-devel

Docker Pulls Docker Build Status

This is a Docker image based on alpine that adds my essential tools to build perl projects.

This includes:

Some common *-dev libs are also included:

  • openssl-dev: allows install of Net::SSLeay;
  • zlib-dev: for Gzip::Faster;
  • expat-dev: for all Expat-based XML parsers;
  • libxml2-dev: allows install of XML::LibXML and friends.

Recommended usage

My usual project Dockerfile uses this image as the first stage, to build the application. The resulting files are then copied over to a new image, using Docker multi-stage builds.

An example:

FROM melopt/alpine-perl-devel AS build

## Add any extra build time libs that you might need
## RUN apk --no-cache add <packages>

COPY cpanfile cpanfile.snapshot /app/
RUN  cd /app && carton install --deployment && rm -rf local/cache ~/.cpanm*

FROM melopt/alpine-perl-runtime

## Add all run time libs and utils that you might need
## RUN apk --no-cache add <packages>

COPY --from=build /app /app

CMD ["your-app-startup"]

Enjoy your small Perl project images.

Repository

This image source repository is at https://github.com/melo/docker-alpine-perl-devel.

Author

Pedro Melo melo@simplicidade.org

About

A Alpine-based image suitable for project building


Languages

Language:Dockerfile 100.0%