Console Application in Docker Container (Ubuntu vs. Alpine)

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.

To test a Xojo Console Application in a Docker Container, I’ve been using Aloe Express Demo. See details in the linked Forum post.

So for Ubuntu, it only takes to add a couple of required Libraries:

FROM ubuntu:18.04

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.
Alpine’s libc6-compat and 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…:

FROM alpine:3.9.4

RUN apk update && apk add libstdc++ \

libc6-compat \

gcompat \

 libunwind \\
 glib \\

RUN cd /tmp && \
curl -L -o /etc/apk/keys/ && \
curl -L -O && \
curl -L -O && \
apk add glibc-2.29-r0.apk \
glibc-bin-2.29-r0.apk && \
rm /tmp/glibc-2.29-r0.apk && \
rm /tmp/glibc-bin-2.29-r0.apk

RUN cd /tmp && \
curl -L -O && \
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/
CMD /app/aloe-express-demo[/code]
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 :slight_smile:

no. Ubuntu, yes. strong no for alpine. I spent like 4 hours messing with alpine then decided that I want some hair left. switched to ubuntu bionic and it just worked (well I had to make sure I had all the right libs).

I even got the Xojo IDE to launch in a Mint based container using the XVFB as the X server. And Mint is Ubuntu based. with a little playing I probably could of gotten Ubuntu Bionic to do the same thing but since the IDE is recommended on top of Mint I just went with that.

I have not tried centos/fedora/CoreOS/etc either. so I cant say one way or another.

Well, “isinf” and “isnan”/"__isnan" are part of the built-in math functions in glibc, so you would need to look for a math library for the libc that Alpine provides. I can’t find a provider for “mailinfo”, but it’s probably part of the larger lib packages that you get with a full Linux release.

Same here :slight_smile: But it would be so nice to have for running console apps (such as Aloe).[quote=436991:@scott boss]witched to ubuntu bionic and it just worked[/quote]
yup, that’ll have to do it - for now… but since I’m always curious - here I am asking :slight_smile:

Cool - I haven’t come that far yet :wink: Do you have a HowTo for that on your Blog by any chance?

I’ve guessed something like this (and therefore tried the other glibc library).
It seems both Scott and me haven’t found something useful (that works with Xojo built apps)… should anyone do - thanks for letting us know. Until then - Ubuntu (and probably also Debian) works just fine. Still - Alpine would be nice for some kind of Xojo-built console services… so I keep dreaming (and maybe trying more some other day), while using Ubuntu for now.

short answer is no. the use case I was going for wasnt stable/reliable/repeatable so I ditched it. I have already talked to @Greg O’Lone about my issues/challenges and once they get addressed then I can return back to doing stuff inside containers.