Skip to content

Instantly share code, notes, and snippets.

@melo
Created November 11, 2016 12:23
Show Gist options
  • Save melo/9b148de1772f1ddee52df9ebe76aa4c1 to your computer and use it in GitHub Desktop.
Save melo/9b148de1772f1ddee52df9ebe76aa4c1 to your computer and use it in GitHub Desktop.
#!/bin/sh
carton install
rm -f tarball.tgz
tar zcvf tarball.tgz cpanfile* x.pl
docker build -t t .
docker run -it --rm t
requires 'JSON::XS';
FROM perl
WORKDIR /perl
ENTRYPOINT ["carton", "exec"]
RUN cpanm -n Carton
COPY tarball.tgz /perl
RUN cd /perl && tar zxf tarball.tgz && carton install --deployment
CMD ["./x.pl"]
#!/usr/bin/env perl
use JSON::XS;
print "we are ok\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment