I’ve been playing with Docker recently. I’ve dockerized cubeSQL, so that I can now use it easily on a Synology NAS. That has been pretty straight-forward (see the Dockerfile in the Description on Docker Hub).
Next attempt has been to run an Aloe Express Demo in a Docker Container.[quote=356328:@Seth Ober]Is anyone aware of a step-by-step primer or something similar to help people get started containerizing Xojo apps?[/quote]
- Build your Aloe Express Demo project for Target Linux 64Bit
- Create a Textfile named
Dockerfile
(content see below) in the built App’s directory - In Terminal:
cd /path/to/built-project
-
docker build -t myname/myaloedemo:1.0.0 .
- This will build the Docker Image using the Dockerfile in this directory, and copy the Aloe Express Demo into it
- Create and run the container:
docker run -d --publish=8080:8080 --name myaloedemotest myname/myaloedemo:1.0.0
- Try your Aloe Express app with a Browser
Dockerfile
for the Aloe Express Example:
[code]#BASE IMAGE
FROM ubuntu:18.04
#INSTALL REQUIRED LIBRARIES
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y libunwind8 libglib2.0
#ADD APPLICATION TO DOCKER IMAGE
ADD / /app/
#EXPOSE PORT AND RUN APPLICATION
EXPOSE 8080
WORKDIR /app
CMD /app/aloe-express-demo
[/code]
Again: pretty straight forward.
Aloe Express (a Console Application) is probably quite the same as a Xojo Web App (Standalone). So I guess this kind of Dockerfile
(using Ubuntu) should work for a Xojo Web App (Standalone), too. It might require some ssl Packages (should they not be part of the base image).