diff --git a/Dockerfile b/Dockerfile index 7abc1c6..08c239e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,9 +57,10 @@ RUN cd /usr/src/phantomjs \ && apk del .build-deps \ && rm -r /*.patch /usr/src +RUN apk add patchelf --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted + # package binary build RUN cd /root \ - && apk add patchelf --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted \ && mkdir -p phantomjs/lib \ && cp /usr/bin/phantomjs phantomjs/ \ && cd phantomjs \ @@ -68,7 +69,7 @@ RUN cd /root \ | cut -d' ' -f2`; do \ cp $lib lib/`basename $lib`; \ done \ - && patchelf --set-rpath lib phantomjs \ + && patchelf --set-rpath '$ORIGIN/lib' phantomjs \ && cd /root \ && tar cvf phantomjs.tar phantomjs \ && bzip2 -9 phantomjs.tar diff --git a/Makefile b/Makefile index b936a6f..fd7d8aa 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -NAME=artifacts/phantomjs-v2.11-alpine.tar.bz2 +NAME=artifacts/phantomjs-alpine-x86_64.tar.bz2 all: $(NAME) $(NAME): @@ -6,5 +6,5 @@ $(NAME): clean: - rm phantomjs-v2.11-alpine.tar.bz2 + rm artifacts/* 2>/dev/null || echo "clean" diff --git a/README.md b/README.md new file mode 100644 index 0000000..4c52f49 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# phantomjs on Alpine Linux x86_64 + +This repository uses docker to build a phantomjs docker images. + +Also it can be used to get a binary release for phantomjs for Alpine Linux x86_64. + +## Building a binary release + +``` +make +``` + +The release will be saved to `artifacts/phantomjs-alpine.tar.bz2`. +