Has anyone managed to get a Xojo built console application running in a Docker Container using Alpine?
When using Ubuntu as the base image, everything works pretty easily. Alpine would be great since it’s much more lightweight.
Just compare a dockerized cubeSQL: The Image size when using Ubuntu is 63MB, whereas with Alpine it’s only 9MB.
So for Ubuntu, it only takes to add a couple of required Libraries:
#INSTALL REQUIRED LIBRARIES
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y libunwind8 libglib2.0[/code]
Alpine is quite different… since it’s so lightweight, it seems that quite some more has to be installed. And it uses a different
glibc variant (
musl libc), which doesn’t seem to work with running Xojo built apps.
gcompat packages give even more errors (that’s why it’s commented out) than another popular glibc library.
Here is what I’ve tried - but it still doesn’t work because of some glibc issues…:
RUN apk update && apk add libstdc++ \
libunwind \\ glib \\ curl
RUN cd /tmp && \
curl -L -o /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
curl -L -O https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-2.29-r0.apk && \
curl -L -O https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-bin-2.29-r0.apk && \
apk add glibc-2.29-r0.apk \
glibc-bin-2.29-r0.apk && \
rm /tmp/glibc-2.29-r0.apk && \
RUN cd /tmp && \
curl -L -O https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-i18n-2.29-r0.apk && \
apk add glibc-i18n-2.29-r0.apk && \
rm /tmp/glibc-i18n-2.29-r0.apk && \
/usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
ADD / /app/
This still complains about
"symbols not found" (isinf, mallinfo, __isnan)…
So for now it seems that I will continue to experiment with Ubuntu… but I’d love to use Alpine because of it’s security and lightweight size.
If anyone gets a Xojo built application running with Alpine Linux - please share how this can be done