Running geckodriver in an Alpine docker container - docker

I'm trying to run GeckoDriver v0.26.0 inside an Alpine 3.10 docker container, specifically python:3.6.6-alpine3.10.
After figuring some things out, I've hit a wall:
/ # geckodriver --version
Error relocating /usr/bin/geckodriver: __register_atfork: symbol not found
Error relocating /usr/bin/geckodriver: __res_init: symbol not found
What am I missing?
How I got here
First spin up the docker container:
docker run -it python:3.6.9-alpine3.10 /bin/sh
Then try installing GeckoDriver
/ # wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
/ # tar -zxf geckodriver-v0.26.0-linux64.tar.gz -C /usr/bin
/ # geckodriver --version
/bin/sh: geckodriver: not found.
Really? but I just extracted it... Hmm... OK. Did it extract correctly? Is $PATH correct?
/ # ls -lah /usr/bin/geckodriver
-rwxr-xr-x 1 1000 1000 6.7M Oct 12 10:19 /usr/bin/geckodriver
/ # echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Yes. OK, Let's google things. Well perhaps I should check the file info. Alpine doesn't have that by default.
/ # apk add file
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/2) Installing libmagic (5.37-r1)
(2/2) Installing file (5.37-r1)
Executing busybox-1.30.1-r2.trigger
OK: 24 MiB in 36 packages
/ # file /usr/bin/geckodriver
/usr/bin/geckodriver: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=32c4cfc2d9346336dc7c20e99a62df9be344d609, with debug_info, not stripped
The answer to that same question says to check for /lib64/ld-linux-x86-64.so.2:
/ # ls /lib64
ls: /lib64: No such file or directory
Missing. OK, how do we get that? The Alpine package repo says it's part of libc6-compat. Cool install that and things will work... right?
/ # apk add libc6-compat
(1/1) Installing libc6-compat (1.1.22-r3)
OK: 24 MiB in 37 packages
/ # ls /lib64
ld-linux-x86-64.so.2
/ # geckodriver --version
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /usr/bin/geckodriver)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/bin/geckodriver)
Error relocating /usr/bin/geckodriver: __register_atfork: symbol not found
Error relocating /usr/bin/geckodriver: _Unwind_Resume: symbol not found
Error relocating /usr/bin/geckodriver: __res_init: symbol not found
Error relocating /usr/bin/geckodriver: _Unwind_GetIP: symbol not found
Error relocating /usr/bin/geckodriver: _Unwind_Backtrace: symbol not found
... Well at least it recognizes it as an executable file now... OK, so we need libgcc_s.so.1. That's in libgcc. Makes sense.
/ # apk add libgcc
(1/1) Installing libgcc (8.3.0-r0)
OK: 24 MiB in 38 packages
/ # geckodriver --version
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/bin/geckodriver)
Error relocating /usr/bin/geckodriver: __register_atfork: symbol not found
Error relocating /usr/bin/geckodriver: __res_init: symbol not found
What? We have ld-linux-x86-64.so.2 in /lib64, where's it looking? I did notice that the gcompat package as /lib/ld-linux-x86-64.so.2, maybe it's looking there?
# / apk add gcompat
(1/2) Installing libucontext (0.1.3-r1)
(2/2) Installing gcompat (0.4.0-r0)
OK: 24 MiB in 40 packages
# / geckodriver --version
Error relocating /usr/bin/geckodriver: __register_atfork: symbol not found
Error relocating /usr/bin/geckodriver: __res_init: symbol not found
And that's where I'm at. Googling for __register_atfork and __res_init don't return anything useful.

So the root cause of the issue appears to be that Alpine uses musl libc and GeckoDriver (indirectly) uses glibc.
SGerrand has a great glibc compatibility layer package for Alpine Linux which we'll make use of.
To get GeckoDriver running on Alpine:
# Get all the prereqs
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-bin-2.30-r0.apk
apk add glibc-2.30-r0.apk
apk add glibc-bin-2.30-r0.apk
# And of course we need Firefox if we actually want to *use* GeckoDriver
apk add firefox-esr=60.9.0-r0
# Then install GeckoDriver
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
tar -zxf geckodriver-v0.26.0-linux64.tar.gz -C /usr/bin
geckodriver --version
Caveats:
Only tested on the python:3.6.9-alpine3.10 docker image.
Alpine 3.10 only has Firefox ESR 60. Luckily GeckoDriver v0.26 has a minimum version of FireFox 60.
The Alpine Edge branch has Firefox-ESR 86 and Firefox 70.

Related

GCP Kubernetes doesn't find libgcc_s for a Elixir Dockerfile project

Context
Currently putting online for the first time an Elixir/Phoenix app on Google Cloud and Kubernetes, (I found a tutorial that I follow a tutorial => run an Elixir/Phoenix app in containers using Google Kubernetes Engine), I'm getting stuck at what seems to be the last step : Deploy to the cluster due to some error I haven't found a fix for.
The app
The elixir app is an umbrella app with two phoenix app, each one with a port (on for the admin website, the other for the general website) and three other elixir app.
There is a custom docker for dev (using docker-compose), and another Dockerfile for production, which is the following one (separated in two parts, I guess the first one is for the image building and the second is for kubernetes):
# prod.Dockerfile
FROM elixir:alpine
ARG app_name=prod
ARG phoenix_subdir=.
ARG build_env=prod
RUN apk add --no-cache make build-base openssl ncurses-libs libgcc libstdc++
ENV MIX_ENV=${build_env} TERM=xterm
WORKDIR /opt/app
RUN apk update \
&& apk --no-cache --update add nodejs npm \
&& mix local.rebar --force \
&& mix local.hex --force
COPY . .
RUN mix do deps.get, compile
RUN cd apps/admin/assets \
&& npm rebuild node-sass \
&& npm install \
&& ./node_modules/webpack/bin/webpack.js \
&& cd .. \
&& mix phx.digest
RUN cd apps/app/assets \
&& npm rebuild node-sass \
&& npm install \
&& ./node_modules/webpack/bin/webpack.js \
&& cd .. \
&& mix phx.digest
RUN mix release ${app_name} \
&& mv _build/${build_env}/rel/${app_name} /opt/release \
&& mv /opt/release/bin/${app_name} /opt/release/bin/start_server
FROM alpine:latest
RUN apk add make build-base --no-cache openssl ncurses-libs libgcc libstdc++
ARG hello
RUN apk update \
&& apk add --no-cache postgresql-client \
&& apk --no-cache --update add bash ca-certificates openssl-dev \
&& mkdir -p /usr/local/bin \
&& wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 \
-O /usr/local/bin/cloud_sql_proxy \
&& chmod +x /usr/local/bin/cloud_sql_proxy \
&& mkdir -p /tmp/cloudsql
ENV GCLOUD_PROJECT_ID=${project_id} \
REPLACE_OS_VARS=true
EXPOSE ${PORT}
EXPOSE 4011
WORKDIR /opt/app
COPY --from=0 /opt/release .
CMD (/usr/local/bin/cloud_sql_proxy \
-projects=${GCLOUD_PROJECT_ID} -dir=/tmp/cloudsql &); \
exec /opt/app/bin/start_server start
Which is called by cloudbuild.yaml:
steps:
- name: "gcr.io/cloud-builders/docker"
args: ["build", "-t", "gcr.io/hello/prod:$_TAG",
"--build-arg", "project_id=hello", ".",
"--file=./prod.Dockerfile"]
images: ["gcr.io/hello/prod:$_TAG"]
The steps
(re)building the image
$> gcloud builds submit --substitutions=_TAG=v1 .
Then create a deployment
$> kubectl run hello-web --image=gcr.io/${PROJECT_ID}/hello:v1 --port 8080
pod/hello-web created
Check if the deployment went well (spoiler: it doesn't)
$> kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-web 0/1 CrashLoopBackOff 1 15s
Check the log
$> kubectl logs {POD-NAME}
Which display the following error:
The error
2021/08/09 23:49:15 current FDs rlimit set to 1048576, wanted limit is 8500. Nothing to do here.
2021/08/09 23:49:15 gcloud is not in the path and -instances and -projects are empty
Error loading shared library libstdc++.so.6: No such file or directory (needed by /opt/app/erts-12.0.3/bin/beam.smp)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /opt/app/erts-12.0.3/bin/beam.smp)
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: __cxa_begin_catch: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZSt24__throw_out_of_range_fmtPKcz: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _Znwm: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZSt20__throw_length_errorPKc: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: __cxa_guard_release: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZNKSt8__detail20_Prime_rehash_policy11_M_next_bktEm: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: __popcountdi2: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZSt17__throw_bad_allocv: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: __cxa_end_catch: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: __cxa_guard_acquire: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEmmm: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZSt19__throw_logic_errorPKc: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: __cxa_rethrow: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _Unwind_Resume: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZdlPvm: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZTVN10__cxxabiv120__si_class_type_infoE: symbol not found
...
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZTVN10__cxxabiv120__si_class_type_infoE: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: __cxa_pure_virtual: symbol not found
...
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: __cxa_pure_virtual: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZTVN10__cxxabiv117__class_type_infoE: symbol not found
...
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZTVN10__cxxabiv117__class_type_infoE: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: _ZTVN10__cxxabiv121__vmi_class_type_infoE: symbol not found
Error relocating /opt/app/erts-12.0.3/bin/beam.smp: __gxx_personality_v0: symbol not found
What have I tried
Though I know almost nothing, I still tried to modify a little bit the Dockerfile, without success. I also search on Google the libgcc error without any success.
That's about it, as I don't have clues were to look other than that.
So, any advises to make it works ?
Other actions
Delete the pod, then get the image's tags and clean it
$> kubectl delete pod hello-web
$> gcloud container images list-tags gcr.io/hello/prod
$> gcloud container images delete gcr.io/hello/prod#sha256:...
Edits
Edit 1 (12/08/2021 19:04)
Update the Dockerfile with the latest version of it
Add another action list
Result : nothing changed
It looks like your question has been asked on the Elixir forums already:
https://elixirforum.com/t/docker-run-error-loading-shared-library-libstdc-so-6-and-libgcc-s-so-1/40496
It looks like a missing runtime dependency in your final image. Try changing RUN apk add --no-cache openssl ncurses-libs to RUN apk add --no-cache openssl ncurses-libs libstdc++.
The fix being to add libstdc++ to your install line.
The reasoning for this is also outlined in the forum post:
The beam has native runtime dependencies and OTP 24 added libc as runtime dependency to support the JIT. With that change it seems like bare alpine:3.9 no longer brings all the required runtime dependencies. You’ll need to make sure that all of those those are present in the app container.
Best of luck!
So, after hours of test, trying of things, I just changed the strategy and focused on the image version instead of the Dockerfile.
$> gcloud builds submit --substitutions=_TAG=v1.1 .
$> kubectl run hello-web --image=gcr.io/${PROJECT_ID}/hello:v1.1 --port 8080
I didn't changed it before because I wanted to keep the same version between the build and the app.
The other thing I changed is the cloudbuild.yaml: I removed the dash in front of the name.
Theses two action made the build run in the pod.

alpine:3.14 docker libtls.so.20 conflict

So I am running into an error with the latest docker build from alpine. alpine:3.14.0 was released about a day ago and was trying to install libressl and libressl-dev and both seem to fail with the error below. My work around at the moment was to build using the alpine:3.12.0 as 3.12.0 seems to not have libretls installed. Although I would like to know how to fix this. I tried to remove libretls but that didn't work (error also below). Thanks
$ docker -v
Docker version 20.10.6, build 370c289
$ docker run --rm -it alpine /bin/ash
/ # apk add libressl-dev
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/5) Installing libressl3.3-libcrypto (3.3.3-r0)
(2/5) Installing libressl3.3-libssl (3.3.3-r0)
(3/5) Installing libressl3.3-libtls (3.3.3-r0)
ERROR: libressl3.3-libtls-3.3.3-r0: trying to overwrite usr/lib/libtls.so.20 owned by libretls-3.3.3-r0.
ERROR: libressl3.3-libtls-3.3.3-r0: trying to overwrite usr/lib/libtls.so.20.0.3 owned by libretls-3.3.3-r0.
(4/5) Installing pkgconf (1.7.4-r0)
(5/5) Installing libressl-dev (3.3.3-r0)
Executing busybox-1.33.1-r2.trigger
1 error; 41 MiB in 19 packages
/ #
/ # apk info libretls
libretls-3.3.3-r0 description:
port of libtls from libressl to openssl
libretls-3.3.3-r0 webpage:
https://git.causal.agency/libretls/
libretls-3.3.3-r0 installed size:
84 KiB
/ #
/ # apk del libretls
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: No such file or directory
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/community: No such file or directory
World updated, but the following packages are not removed due to:
libretls: busybox alpine-baselayout apk-tools
OK: 6 MiB in 14 packages
/ # exit
this is the upstream issue. Downgrading to alpine 3.13 works for now until the issue is fixed.
Normally docker images support fixed alpine versions (thanks to MrGlass comment). For example
python:3-alpine -> python:3-alpine3.13
php:7.4-fpm-alpine -> php:7.4-fpm-alpine3.13

KDE Purpose build fails only in docker container

We currently encounter a strange issue with the latest KDE / Archlinux releases.
We cannot get KDE's Purpose framework to compile inside a docker container, although it works fine on our host machines. We tried to compile it with GCC and Clang.
The error we receive is:
CMakeFiles/saveasplugin.dir/saveasplugin.cpp.o: In function `SaveAsShare::SaveAsShare()':
saveasplugin.cpp:(.text+0x81): undefined reference to `vtable for SaveAsShare'
CMakeFiles/saveasplugin.dir/saveasplugin.cpp.o: In function `SaveAsShare::~SaveAsShare()':
saveasplugin.cpp:(.text+0x113): undefined reference to `vtable for SaveAsShare'
CMakeFiles/saveasplugin.dir/saveasplugin.cpp.o: In function `SaveAsShare::~SaveAsShare()':
saveasplugin.cpp:(.text+0x133): undefined reference to `vtable for SaveAsShare'
collect2: error: ld returned 1 exit status
make[2]: *** [src/plugins/saveas/CMakeFiles/saveasplugin.dir/build.make:122: bin/kf5/purpose/saveasplugin.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:1149: src/plugins/saveas/CMakeFiles/saveasplugin.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
You can reproduce the docker environment with the following Dockerfile:
FROM archlinux/base
RUN pacman -Syu --noconfirm && pacman --noconfirm -S git base-devel cmake extra-cmake-modules asp sudo
RUN useradd -ms /bin/bash arch
RUN echo 'arch ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers
USER arch
WORKDIR /home/arch
RUN asp checkout purpose
WORKDIR /home/arch/purpose/trunk
RUN gpg --keyserver ipv4.pool.sks-keyservers.net --recv-keys 58D0EE648A48B3BB
(If you only have IPv6 available and no IPv4, you need to edit line 9)
After you build the container run it and execute makepkg -s --noconfirm
It will now build the archlinux package and you will encounter the above mentioned error during the linking phase.
We currently do not even have the slightest clue what the reason for this error could be, as it builds without any problems on our host machines. Any ideas?
We also tested different base archlinux docker images such as pritunl/archlinux.
Environment:
purpose: 5.43.0-1
GCC: 7.3.0
CLang: 5.0.1-2
This is a bug with the statx syscall used by the MOC to generate the appropriate cpp files. In the default confined configuration, docker uses seccomp to prevent or allow certain syscalls, which does not allow the statx syscall. See this for allowed syscalls.
This bug has been reported on the archlinux bugtracker, qt bugtracker and docker bugtracker already, without a (permanent) solution.
Solution 1:
Run your docker container with docker run --security-opt seccomp:unconfined as per this suggestion.
Solution 2:
Patch or downgrade to remove the statx syscall from qt.

How to solve `Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o` while compiling qpid-cpp within Docker Alpine?

Qpid-cpp has been compiled in a Ubuntu docker image and the current size is 1.86GB:
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-qpid-cpp latest 7e60a5eabee1 44 hours ago 1.86 GB
Aim
To compile qpid-cpp within docker alpine to reduce the disk size of the image
Problem
Some packages that are available in Ubuntu are omitted or different in Alpine, e.g.:
ubuntu
RUN apt-get update -y && \
apt-get install -y wget && \
apt-get install -y build-essential python ruby && \
apt-get install -y cmake libblkid-dev e2fslibs-dev libboost-all-dev libaudit-dev
Attempt
In order to find the substitution packages the Dockerfile was built and when an error occurred the required package that is available in Alpine was added.
alpine
RUN apk update && \
apk add wget python ruby cmake build-base boost-dev util-linux-dev
Although most errors were solved, the following issue occurs while compile qpid-cpp within alpine:
[ 17%] Building CXX object
src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o
In file included from
/qpid-cpp/bld/qpid-cpp-1.36.0/src/qpid/sys/posix/Condition.h:31:0,
from /qpid-cpp/bld/qpid-cpp-1.36.0/src/qpid/sys/posix/Condition.cpp:22:
/usr/include/sys/errno.h:1:2: error: #warning redirecting incorrect
#include <sys/errno.h> to <errno.h> [-Werror=cpp]
#warning redirecting incorrect #include <sys/errno.h> to <errno.h>
^~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/qpidcommon.dir/build.make:2727:
src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1494: src/CMakeFiles/qpidcommon.dir/all]
Error 2 make: *** [Makefile:161: all] Error 2
The command '/bin/sh -c cd qpid-cpp/bld/qpid-cpp-1.36.0 && make all && make
install' returned a non-zero code: 2
Question
How to solve the compilation issue Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o while compiling qpid-cpp within Docker Alpine?
I tried this with Ubuntu and Alpine docker images, and I get the same problem on Alpine. It appears that qpid won't build on Alpine Linux.
Be aware that the Ubuntu:16.04 image is 130 MB, 750 MB with dependencies installed. Compared to Alpine's 5 MB, and 476 MB with dependencies.
So those 1.86 GB are mostly made up of build dependencies and qpid itself. You won't be able to escape that with any other image. Maybe you could purge some of the build dependencies after building to decrease the final size.

Docker Alpine Texlive

I would like to generate pdfs from my working directory with docker file where is texlive included
/***Dockerfile***/
FROM alpine
RUN sed -i -e 's/v3\.4/edge/g' /etc/apk/repositories
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN apk update\
&& apk add texlive-full
WORKDIR ./mountvolume
/**Build Image**/
docker build -t texlive .
The Docker Image is working like expectetd but when ich try
docker run -v $PWD:/mountvolume texlive /bin/sh -c 'pdflatex article.tex'
i get the error:
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Alpine Linux) (preloaded format=pdflatex)
restricted \write18 enabled.
kpathsea: Running mktexfmt pdflatex.fmt
Can't locate mktexlsr.pl in #INC (#INC contains: /usr/share/tlpkg /usr/share/texmf-dist/scripts/texlive /usr/local/lib/perl5/site_perl /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /usr/bin/mktexfmt line 23.
BEGIN failed--compilation aborted at /usr/bin/mktexfmt line 25.
I can't find the format file pdflatex.fmt!
Your Dockerfile needs to be a bit more elaborate: see issue 4514
Looks like that texlive package isn't enough to get fully functional TeX system (2015: fmtutil.pl depends on mktexlsr.pl)
texlive has been on testing repo for a long time.
But it's missing some stuff, most important being texlive-texmf.
If you want to use texlive today you must install the package from testing, download texlive-20160523b-texmf.tar.xz, copy contents to /usr/share/texmf-dist and reinstall the package from testing.
But:
What alpine needs is to package texlive-texmf too.
But no alpine linux developer has looked into this yet

Resources