dxma / perl5-json-jq

JSON::JQ - jq (https://stedolan.github.io/jq/) library binding
MIT License
5 stars 4 forks source link

Fix linking error seen on Alpine Linux #10

Closed rjbell4 closed 3 years ago

rjbell4 commented 3 years ago

Fixes #9

rjbell4 commented 3 years ago

Example Dockerfile demonstrating fix:

FROM alpine:3.13
RUN apk add bash wget unzip perl perl-dev perl-app-cpanminus build-base cmake openssl openssl-dev zlib-dev
RUN env PERL_MM_USE_DEFAULT=1 cpanm Carton
RUN cd /root && echo "requires 'JSON::JQ', url => 'https://github.com/rjbell4/perl5-json-jq/releases/download/v0.05-fixed/JSON-JQ-0.05-fixed.tar.gz';" > cpanfile && carton install
RUN perl -I/root/local/lib/perl5 -MJSON::JQ -le 'print "It works"'

Output:

Sending build context to Docker daemon  186.9kB
Step 1/5 : FROM alpine:3.13
 ---> 6dbb9cc54074
Step 2/5 : RUN apk add bash wget unzip perl perl-dev perl-app-cpanminus build-base cmake openssl openssl-dev zlib-dev
 ---> Using cache
 ---> 9ba002764c03
Step 3/5 : RUN env PERL_MM_USE_DEFAULT=1 cpanm Carton
 ---> Using cache
 ---> 2a59e2d4c1e0
Step 4/5 : RUN cd /root && echo "requires 'JSON::JQ', url => 'https://github.com/rjbell4/perl5-json-jq/releases/download/v0.05-fixed/JSON-JQ-0.05-fixed.tar.gz';" > cpanfile && carton install
 ---> Running in c90806297cca
Installing modules using /root/cpanfile
Successfully installed File-Which-1.27
Successfully installed Capture-Tiny-0.48
Successfully installed Path-Tiny-0.118
Successfully installed File-chdir-0.1010
Successfully installed FFI-CheckLib-0.27
Successfully installed Alien-Build-2.40
Successfully installed Module-Build-0.4231
Successfully installed Sort-Versions-1.62
Successfully installed Net-SSLeay-1.90
Successfully installed Mozilla-CA-20200520
Successfully installed IO-Socket-SSL-2.070
Successfully installed URI-5.09
Successfully installed Mojo-DOM58-3.000
Successfully installed Alien-cmake3-0.05
Successfully installed Alien-LibJQ-0.05
Successfully installed enum-1.11
Successfully installed JSON-4.03
Successfully installed JSON-JQ-0.05
18 distributions installed
Complete! Modules were installed into /root/local
Removing intermediate container c90806297cca
 ---> 90bf64de2860
Step 5/5 : RUN perl -I/root/local/lib/perl5 -MJSON::JQ -le 'print "It works"'
 ---> Running in 6a1e1c4a4651
It works
Removing intermediate container 6a1e1c4a4651
 ---> e29ec8c4251c
Successfully built e29ec8c4251c