Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

:polyglot

All-in-one image for mixed-language pipelines. Inherits all :rust tools (which include all :core tools), and adds Deno and Python 3.

Base

FROM ghcr.io/driftsys/dock:rust (via build context)

Installed tools

Includes everything from :rust plus:

ToolInstall methodPurpose
denoofficial static binaryTypeScript/JavaScript runtime
python3apkPython 3 interpreter
pipapk (py3-pip)Package installer
ruffpipLinter and formatter

Use case: Deno FFI with Rust

The polyglot image supports Deno’s Foreign Function Interface (FFI) to call Rust-compiled shared libraries:

// Compile: cargo build --release --lib
const lib = Deno.dlopen("libmylib.so", {
  my_fn: { parameters: ["i32"], result: "i32" },
});
console.log(lib.symbols.my_fn(42));
lib.close();

Usage in CI

jobs:
  interop:
    runs-on: ubuntu-latest
    container: ghcr.io/driftsys/dock:polyglot
    steps:
      - uses: actions/checkout@v4
      - run: cargo build --release --lib
      - run: deno run --allow-ffi --unstable-ffi main.ts

Approximate size

~382 MB (Alpine)