Building Docker images of Magic Wormhole backend services and CLI:
-
Magic Wormhole Mailbox Server
-
Magic Wormhole Transit Relay
-
Magic Wormhole Protocol implementation and CLI
-
Docker hub target: https://hub.docker.com/r/leastauthority/magic-wormhole
The 2 first images are currently used in the magic-wormhole backend operated by https://github.com/LeastAuthority for use by the following products:
-
Winden https://winden.app/ (see https://github.com/LeastAuthority/winden)
-
Destiny (see https://github.com/LeastAuthority/destiny)
This repository provides Docker Composer files to build and test the images. The test is basic: send and receive "Hello world!" message through a local wormhole.
# Build the back-end images
docker compose -f docker-compose-back.yml build
# Build the front-end images
docker compose -f docker-compose-front.yml build
# Start the back-end in the background
docker compose -f docker-compose-back.yml up --detach
# Start the front-end in the foreground
docker compose -f docker-compose-front.yml up
# Stop the back-end (or replay the previous step)
docker compose -f docker-compose-back.yml down
REM: Use docker-compose
for older version.
Update the requirements.in
file in selected target folder and replace the Git hash used to determine the version:
magic-wormhole-mailbox-server @ https://github.com/magic-wormhole/magic-wormhole-mailbox-server@4b358859ba80de37c3dc0a5f67ec36909fd48234#egg=magic-wormhole-mailbox-server
or just give the desired released version:
magic-wormhole==0.12.0
Install pip-tools
and run
pip-compile --generate-hashes requirements.in
In order to have an exact reference to the desired version we use
Variant | Command | Use case |
---|---|---|
latest tag reachable from current commit |
|
when building for tags on |
Short git hash of the current commit |
|
when building for non-tag commits on |
Tags an commit hashes reference this repository.
To manually build for a tag like reference, e. g. 0.4.1-11-gac91c3a
.
cd mailbox
docker build . -t leastauthority/magic-wormhole-mailbox:0.4.1-11-gac91c3a --build-arg VERSION_TAG=0.4.1-11-gac91c3a