User-provided apps run on Charity Engine must be packaged as Docker images. The command line you specify at job submission runs inside the container.

Requirements


Use the smallest Linux base image that meets your needs. Alpine Linux (alpine:3) is recommended — it is under 10 MB and has a full package manager (apk). If your application requires glibc (common for compiled C/C++ binaries), use debian:bookworm-slim or ubuntu:24.04 instead.

Minimal Dockerfile example

Begin by creating a plain text file named Dockerfile on the model of the template below:

FROM alpine:3

# Install runtime dependencies
RUN apk add --no-cache libstdc++

# Copy your application binary
COPY myapp /usr/local/bin/myapp

ENTRYPOINT ["myapp"]

(info)  See Writing a Dockerfile and the Dockerfile reference for further information.

Build and publish

We recommend publishing containers to Docker Hub. (This will, of course, require a [free] Dockhub account.)

# Build the image
docker build -t yourdockerhubuser/myapp:1.0 .

# Log in to Docker Hub
docker login

# Push to Docker Hub
docker push yourdockerhubuser/myapp:1.0

# Then reference the image in your job submission as docker:yourdockerhubuser/myapp:1.0


Keep images small — large images increase startup latency on every node that hasn't cached them. Avoid bundling unnecessary tools, package caches, or build-time dependencies in the final image.


  • No labels