-
-
Save vovimayhem/6437c2f03b654e392ccf3e9903eba6af to your computer and use it in GitHub Desktop.
# 1: Use node 6 as base: | |
FROM node:6-alpine | |
# 2: Download+Install PhantomJS, as the npm package 'phantomjs-prebuilt' won't work on alpine! | |
# See https://github.com/dustinblackman/phantomized | |
RUN set -ex \ | |
&& apk add --no-cache --virtual .build-deps ca-certificates openssl \ | |
&& wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C / \ | |
&& npm install -g phantomjs \ | |
&& apk del .build-deps |
This is the summary of everything mentioned above that works for me as well
#FROM - an alpine image or any image that you may use and are facing the issue
# WORKDIR - any workdir that you may use
# RUN some other commands if needed
# If you also need fonts then add this - Select any fonts from here https://wiki.alpinelinux.org/wiki/Fonts#List_of_fonts_in_Alpine_Linux:~:text=ttf%2Dubuntu%2Dfont%2Dfamily
# Just replace ttf-ubuntu-font-family with fonts that you need
RUN apk --update add ttf-ubuntu-font-family fontconfig && rm -rf /var/cache/apk/*
# if ever you need to change phantom js version number in future ENV comes handy as it can be used as a dynamic variable
ENV PHANTOMJS_VERSION=2.1.1
# magic command
RUN apk add --no-cache curl && \
cd /tmp && curl -Ls https://github.com/dustinblackman/phantomized/releases/download/${PHANTOMJS_VERSION}/dockerized-phantomjs.tar.gz | tar xz && \
cp -R lib lib64 / && \
cp -R usr/lib/x86_64-linux-gnu /usr/lib && \
cp -R usr/share /usr/share && \
cp -R etc/fonts /etc && \
curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2 | tar -jxf - && \
cp phantomjs-${PHANTOMJS_VERSION}-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && \
rm -fR phantomjs-${PHANTOMJS_VERSION}-linux-x86_64 && \
apk del curl
# magic command if you don't want to use ENV dynamic phantomjs version
RUN apk add --no-cache curl && \
cd /tmp && curl -Ls https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz | tar xz && \
cp -R lib lib64 / && \
cp -R usr/lib/x86_64-linux-gnu /usr/lib && \
cp -R usr/share /usr/share && \
cp -R etc/fonts /etc && \
curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar -jxf - &&\
cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && \
rm -fR phantomjs-2.1.1-linux-x86_64 && \
apk del curl
# RUN any other commands still pending
# ENTRYPOINT
# CMD
today, this : https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz not able to download,
Recently I'm getting the error
ERROR: unable to select packages:
ttf-ubuntu-font-family (no such package):
required by: world[ttf-ubuntu-font-family]
Anyone know how to fix this?
Edit:
I have found this issue alpinelinux/docker-alpine#181 and I think the solutions is to change from ttf-ubuntu-font-family
to ttf-freefont
Solved this using image that indicates node version 3.12, in my case node:16-alpine3.12
. In this way using the 3.13 wich have this issue with the unmantained ttf-ubuntu-font-family package is avoided.
The following works for php:7-fpm-alpine
:
RUN apk add --no-cache fontconfig \
&& mkdir /tmp/phantomjs-prereq /tmp/phantomjs \
&& curl -sSLf -o /tmp/phantomjs-prereq.tar.gz https://github.com/dustinblackman/phantomized/releases/latest/download/dockerized-phantomjs.tar.gz \
&& curl -sSLf -o /tmp/phantomjs.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 \
&& tar xzf /tmp/phantomjs-prereq.tar.gz -C /tmp/phantomjs-prereq \
&& tar xjf /tmp/phantomjs.tar.bz2 -C /tmp/phantomjs --strip-components=1 \
&& cp -nr /tmp/phantomjs-prereq/lib/x86_64-linux-gnu /lib \
&& cp -nr /tmp/phantomjs-prereq/lib64 /lib64 \
&& cp -nr /tmp/phantomjs-prereq/usr/lib/x86_64-linux-gnu /usr/lib \
&& cp /tmp/phantomjs/bin/phantomjs /usr/local/bin/phantomjs \
&& rm -rf /tmp/*
Fortunately my project does not require the abandoned ttf-ubuntu-font-family
package.
thanks @abhi5658, that did it for me!
Hi,
I'm trying to achieve this on a php:8.1-fpm-alpine3.16.
After doing what is mentionned above, it failed after when I do php -v
Any ideas?
Thanks
Click to see errors
Error loading shared library libssl.so.1.0.0: No such file or directory (needed by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
Error loading shared library libcrypto.so.1.0.0: No such file or directory (needed by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
Error loading shared library libgcrypt.so.11: No such file or directory (needed by /usr/lib/x86_64-linux-gnu/librtmp.so.0)
Error loading shared library libresolv.so.2: No such file or directory (needed by /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2)
Error loading shared library libgcrypt.so.11: No such file or directory (needed by /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2)
Error loading shared library libgcrypt.so.11: No such file or directory (needed by /usr/lib/x86_64-linux-gnu/libgnutls.so.26)
Error loading shared library libresolv.so.2: No such file or directory (needed by /usr/lib/x86_64-linux-gnu/libkrb5.so.3)
Error loading shared library libresolv.so.2: No such file or directory (needed by /usr/lib/x86_64-linux-gnu/libroken.so.18)
Error relocating /usr/lib/x86_64-linux-gnu/libsqlite3.so.0: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsqlite3.so.0: __memset_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: CRYPTO_cleanup_all_ex_data: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: sk_pop_free: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: __poll_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: __rawmemchr: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: OPENSSL_add_all_algorithms_noconf: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: __vsnprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: EVP_cleanup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: ERR_free_strings: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: SSLv3_client_method: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: SSLv23_client_method: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: __strcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: sk_num: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: ENGINE_cleanup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: SSLeay: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: RAND_egd: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: SSL_library_init: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: __sprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: sk_value: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: sk_pop: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: __strtok_r: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: SSL_load_error_strings: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libcurl.so.4: __fdelt_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libidn.so.11: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_get_nbits: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_set: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_cmp: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_cipher_open: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_md_close: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_sub_ui: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_md_read: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_md_open: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_cipher_setkey: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_print: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_powm: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_md_write: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_cipher_encrypt: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_new: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_set_ui: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_md_setkey: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: __vsnprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_release: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: __strncpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_scan: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_mpi_cmp_ui: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: gcry_cipher_close: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/librtmp.so.0: __sprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2: __memmove_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2: __vsnprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2: __sprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: __res_query: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: __rawmemchr: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: __vsnprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: __strcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: __dn_expand: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: gcry_control: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: __sprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: sys_nerr: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: sys_errlist: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_get_nbits: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_set: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_mod: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_cmp: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_prime_release_factors: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_md_get_algo_dlen: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_mul_ui: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_cipher_open: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_md_close: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_subm: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_sub_ui: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_md_read: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_md_open: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_cipher_setkey: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_sexp_release: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_div: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_print: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_powm: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_mulm: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_md_write: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_mul: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_check_version: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_addm: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_cipher_encrypt: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_pk_encrypt: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_add_ui: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_sexp_find_token: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_md_get_algo: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: __register_atfork: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_new: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_sexp_nth_mpi: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_pk_verify: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_set_ui: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_md_setkey: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_cipher_setiv: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: __vasprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_prime_generate: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_sexp_build: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_sub: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_pk_sign: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_release: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_scan: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_cmp_ui: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_add: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_cipher_decrypt: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_md_copy: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_create_nonce: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_prime_check: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_control: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_pk_genkey: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_mpi_invm: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_prime_group_generator: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_cipher_close: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_pk_decrypt: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: gcry_randomize: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgnutls.so.26: __sprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __res_ninit: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __strtok_r: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __poll_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __res_nsearch: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __res_nclose: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __strncpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __memset_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.3: __strncat_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libk5crypto.so.3: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libk5crypto.so.3: __printf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5support.so.0: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5support.so.0: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5support.so.0: __vsnprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __fdelt_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __stpcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __strcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __printf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __syslog_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __strncat_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libsasl2.so.2: __sprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgssapi.so.3: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgssapi.so.3: __asprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libgssapi.so.3: __vasprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libtasn1.so.6: __strcat_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libtasn1.so.6: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libtasn1.so.6: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libtasn1.so.6: __stpcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libtasn1.so.6: __strcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libtasn1.so.6: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: __strcat_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: __vfprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: __register_atfork: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: __vsnprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libp11-kit.so.0: __sprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: backtrace: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: backtrace_symbols: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __asprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __res_init: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __syslog_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __memmove_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __vasprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __open_2: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libkrb5.so.26: __fdelt_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libasn1.so.8: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libasn1.so.8: __strtok_r: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libasn1.so.8: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libasn1.so.8: __asprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libasn1.so.8: __printf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhcrypto.so.4: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhcrypto.so.4: __memcpy_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhcrypto.so.4: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhcrypto.so.4: __memset_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhcrypto.so.4: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhcrypto.so.4: __open_2: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __vfprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __res_ninit: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __fdelt_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __strtok_r: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __res_nsearch: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __asprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __res_nclose: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __vasprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __printf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __dn_expand: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libroken.so.18: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libwind.so.0: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libheimbase.so.1: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libheimbase.so.1: __vasprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libheimbase.so.1: __vsnprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libheimbase.so.1: __syslog_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhx509.so.5: __fprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhx509.so.5: __printf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhx509.so.5: __vsnprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhx509.so.5: __strdup: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhx509.so.5: __asprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhx509.so.5: __vfprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhx509.so.5: __snprintf_chk: symbol not found
Error relocating /usr/lib/x86_64-linux-gnu/libhx509.so.5: __vasprintf_chk: symbol not found
Error relocating /usr/local/bin/php: curl_mime_filename: symbol not found
Error relocating /usr/local/bin/php: curl_mime_addpart: symbol not found
Error relocating /usr/local/bin/php: curl_mime_data: symbol not found
Error relocating /usr/local/bin/php: curl_mime_free: symbol not found
Error relocating /usr/local/bin/php: sqlite3_expanded_sql: symbol not found
Error relocating /usr/local/bin/php: curl_mime_name: symbol not found
Error relocating /usr/local/bin/php: curl_mime_init: symbol not found
Error relocating /usr/local/bin/php: curl_pushheader_bynum: symbol not found
Error relocating /usr/local/bin/php: curl_mime_type: symbol not found
Error relocating /usr/local/bin/php: curl_mime_data_cb: symbol not found
@floviolleau any solution? I am facing the same issue
Thanks @StrangePeanut
Yup, living the pain right now. One of hour legacy apps can't build because this tarball is missing. Trying to build phantomized from source is also giving me issues.
Hi @maldetect,
Finally, we decided to remove the dependency to PhantomJS from our project because of all this pain.
I think, I saved this tarball somewhere. I will try to upload here tomorrow.
@CanadianCommander-Work Have you been able to build phantomize or found another solution?
Hi @maldetect,
Finally, we decided to remove the dependency to PhantomJS from our project because of all this pain.
I think, I saved this tarball somewhere. I will try to upload here tomorrow.
any update?
I cant confidently say that PDFs are 100% being generated correctly but I was able to use a previous image that used this project to generated my own .tar.gz and get the build to pass.
docker cp <container-name>:/ <out-dir>
- I removed all files except those listed here dustinblackman/phantomized#1
tar -zcf phantomize.tar.gz ./lib ./lib64 ./usr/lib
- Uploaded the tar.gz and updated the URL in my docker file.
Hopefully the package author wakes up and uploads an offical .gz
I fixed it like this. It works.
RUN apk add --update --no-cache curl && \
if curl -Ls "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C /; then \
echo "Downloaded and extracted from first URL"; \
else \
echo "First URL failed, attempting second URL"; \
curl -k -Ls "https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2" | tar -jxvf - -C / && \
cp phantomjs-${PHANTOMJS_VERSION}-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && \
rm -fR phantomjs-${PHANTOMJS_VERSION}-linux-x86_64; \
fi && \
apk del curl
WORKDIR /usr/src/app
Hi,
I finally found it. Here is the share: https://drive.google.com/file/d/1CEdvkwG0-bKNTlE2AmYOQ1PCiY0t3TmE/view?usp=sharing
This what I used in my Dockerfile:
# PhantomJs
RUN apk add --update --no-cache curl tar &&\
cd /tmp && curl -Ls https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz | tar xz &&\
cp -R lib lib64 / &&\
cp -R usr/lib/x86_64-linux-gnu /usr/lib &&\
cp -R usr/share/fonts /usr/share &&\
cp -R etc/fonts /etc &&\
curl -k -Ls "https://drive.google.com/uc?export=download&id=1CEdvkwG0-bKNTlE2AmYOQ1PCiY0t3TmE" | tar -jxf - &&\
# curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar -jxf - &&\
cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs &&\
rm -rf /tmp/*
I have this file as well:
- phantomjs-alpine-x86_64.tar.bz2 - https://drive.google.com/file/d/1meTCsgvjW6ALWV6iiJvczKzlHsIiBP8s/view?usp=sharing
But I don't remember where I used it and where I took it
i found it on https://archive.org/web/web.php and downloaded it.
@CanadianCommander-Work Have you been able to build phantomize or found another solution?
I actually did mange to build the tar
. I sort of gave up building phantomized
from source. When you look at what that repo actually does, it is actually just a script that runs dockerize
... no not the golang version, the python version which is completely different. It basically just copies a bunch of binaries needed by phantomJS in to a tar ball. So I just started an Ubuntu18 container and followed the script steps by hand. This allowed me to generate the tar ball. Needless to say, I've put a Jira ticket in to remove our dependence on PhantomJS.
I've found a solution. This is the solution I use in my docker file.
ENV PHANTOMJS_VERSION=2.1.1
RUN apk update && apk add --no-cache fontconfig curl curl-dev &&
cd /tmp && curl -Ls "https://drive.google.com/uc?export=download&id=1Lm-QjJ3WmPv5X3xI_3eVF1CxfQ02wCl0" | tar xz &&
cp -R phantomjs/lib phantomjs/lib64 / &&
cp -R phantomjs/x86_64-linux-gnu /usr/lib &&
cp -R phantomjs/share /usr/share &&
cp -R phantomjs/fonts /etc &&
curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2 | tar -jxf - &&
cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
I fork this repository and publish release again.
you can use this link instead.
https://github.com/topseom/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz
cd /tmp && curl -Ls https://github.com/topseom/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz | tar xz &&
cp -R lib lib64 / &&
cp -R usr/lib/x86_64-linux-gnu /usr/lib &&
cp -R usr/share /usr/share &&
cp -R etc/fonts /etc &&
this not working with above url https://github.com/topseom/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz
error
cp: can't stat 'usr/share': No such file or directory
also cp: can't stat 'lib': No such file or directory
cp: can't stat 'lib64': No such file or directory
@shashank34 I see
I create new tag 2.1.1 for full tar file use this link :
https://github.com/topseom/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz
use tag 2.1.1a for slim version ( only lib,lib64,usr/lib ) use this link : https://github.com/topseom/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz
Thank you @topseom.
Please is this new link working?
Its working, just tried it.
Thanks @topseom .. Created a backup release in case shit happens again: https://github.com/Nuxify/phantomized/releases/tag/2.1.1
I'm new to Phantomjs and we have an angular project running Karma/phantomjs unit tests. We're setting up cicd pipeline using Jenkins but the unit tests is failing to run. I've tried all the suggestions above but it's still not working. I'm using a base image with Alpine v3.9, Java 8 and NodsJs 8.11.4
We're running the Jenkins job as user jenkins.
I've also tried changing the ownership for the folders to jenkins without luck.
When I run as root user locally, it works.
This is the errors when running as user jenkins
webpack: wait until bundle finished:
ts-loader: Using typescript@2.9.2 and /var/jenkins_home/workspace/tsconfig.json
Hash: a02d93f7abf3faf09a0d
Version: webpack 1.15.0
Time: 142558ms
Asset Size Chunks Chunk Names
../../src/test.ts 16.7 MB 0 [emitted] ../../src/test.ts
chunk {0} ../../src/test.ts (../../src/test.ts) 16.4 MB [rendered]
webpack: Compiled successfully.
27 01 2020 22:36:47.165:ERROR [phantomjs.launcher]: Fontconfig warning: ignoring C.UTF-8: not a valid language tag
27 01 2020 22:37:46.949:ERROR [phantomjs.launcher]: Fontconfig warning: ignoring C.UTF-8: not a valid language tag
27 01 2020 22:38:47.023:ERROR [phantomjs.launcher]: Fontconfig warning: ignoring C.UTF-8: not a valid language tag
27 01 2020 22:39:46.986:ERROR [launcher]: PhantomJS failed 2 times (timeout). Giving up.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vt-unittest@3.0.0 test-build:
export NODE_ENV=local && karma start config/karma/karmaBuildConfig.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vt-unittest@3.0.0 test-build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jenkins/.npm/_logs/2020-01-27T22_39_47_160Z-debug.log
/var/jenkins_home/workspace $ cat /home/jenkins/.npm/_logs/2020-01-27T22_39_47_160Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'test-build' ]
2 info using npm@5.6.0
3 info using node@v8.11.4
4 verbose run-script [ 'pretest-build', 'test-build', 'posttest-build' ]
5 info lifecycle vt-unittest@3.0.0
pretest-build: vt-unittest@3.0.0test-build: vt-unittest@3.0.06 info lifecycle vt-unittest@3.0.0
7 verbose lifecycle vt-unittest@3.0.0
test-build: unsafe-perm in lifecycle truetest-build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/jenkins_home/workspace/node_modules/.bin:/usr/local/apache-maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin8 verbose lifecycle vt-unittest@3.0.0
9 verbose lifecycle vt-unittest@3.0.0
test-build: CWD: /var/jenkins_home/workspacetest-build: Args: [ '-c',10 silly lifecycle vt-unittest@3.0.0
10 silly lifecycle 'export NODE_ENV=local && karma start config/karma/karmaBuildConfig.js' ]
11 silly lifecycle vt-unittest@3.0.0
test-build: Returned: code: 1 signal: nulltest-build: Failed to exec test-build script12 info lifecycle vt-unittest@3.0.0
13 verbose stack Error: vt-unittest@3.0.0 test-build:
export NODE_ENV=local && karma start config/karma/karmaBuildConfig.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid vt-unittest@3.0.0
15 verbose cwd /var/jenkins_home/workspace
16 verbose Linux 4.9.184-linuxkit
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test-build"
18 verbose node v8.11.4
19 verbose npm v5.6.0
20 error code ELIFECYCLE