Skip to content

samoht/docker-extension-ocaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Docker Desktop extensions in OCaml

Usage

Install Docker extension: https://docs.docker.com/desktop/extensions/

To try it:

$ docker extension install tarides/hello

How it works

UI

The ui/ code runs in the same process as Docker for Desktop electron UI. It is compiled to Javascript with js_of_ocaml and hot-loaded by the docker extension command.

ui/dd.ml is a very minimal binding to the Docker Desktop Client API. It's using the wonderful Brr.

VM

The vm/ code runs inside the Linux VM, as a container. It uses a slighlty modified version of Dream that allows to start HTTP servers listening on Unix domain sockets. docker extension starts the container in the VM and connects the relevant sockets so that the UI can talk to the backend using REST calls.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published