Sign inSign up

melopt/alpine-perl-devel

By melopt

•Updated over 7 years ago

Alpine-based image for Perl project builds

Image
2

509

melopt/alpine-perl-devel repository overview

⁠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:

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 <build-time-needed-packages>

COPY cpanfile* /app/
RUN  cd /app && build-perl-deps

FROM melopt/alpine-perl-runtime

## Add libs and utils that your app might need during runtime
## RUN apk --no-cache add <runtime-needed-packages>

COPY --from=build /app /app

CMD ["your-app-startup"]

Enjoy your small Perl project images.

⁠Extras

⁠build-perl-deps

A utility script is included, build-perl-deps, that checks the current directory for a cpanfile and optionally for a cpanfile.snapshot.

If found, it will use Carton to install your dependencies.

If all goes well, it will cleanup build and cache files to keep your images small.

If an error is detected during the build process, a second install is attempted, with--verbose and if the second one also fails, the content of the ´cpanm build.log` file is printed.

⁠Repository

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

⁠Author

Pedro Melo [email protected]⁠

Tag summary

Content type

Image

Digest

Size

85.2 MB

Last updated

over 7 years ago

docker pull melopt/alpine-perl-devel