Skip to content
On this page

Install using Docker

This guide provides steps to install and configure Bondy on Docker using the official Docker images.

Using your own image instead

If you want to build and use your own Docker image, make sure you check the official images sources first as you might want to use them as your template.

These are located at the Bondy's Github repository under the "deployment" directory.

Prerequisites

  • A Docker-enabled system with proper Docker access

Steps

1. Setup directory

Bondy needs access to a configuration file and the ability to store its embeded database. Choose a directory (or create one) e.g. bondy-docker.

bash
mkdir ~/bondy-docker
1

Create an etc directory within your chosen directory.

bash
cd ~/bondy-docker
mkdir etc
cd etc
1
2
3

2. Prepare a security.config.json file

Using your prefered text editor, create a file named security.config.json ( This file can have any other name you like but make sure to use the same name in the following step.).

The copy the following content and save the file in the etc directory we created in the previous step.

json
[
    {
        "uri": "bondy",
        "authmethods": [
            "wampcra",
            "ticket",
            "anonymous"
        ],
        "security_enabled": true,
        "users": [],
        "groups": [
            {
                "name": "administrators",
                "groups": [],
                "meta": {
                    "description": "The administrators of Bondy."
                }
            }
        ],
        "sources": [
            {
                "usernames": "all",
                "authmethod": "password",
                "cidr": "0.0.0.0/0",
                "meta": {
                    "description": "Allows all users from any network authenticate using password credentials."
                }
            },
            {
                "usernames": [
                    "anonymous"
                ],
                "authmethod": "trust",
                "cidr": "0.0.0.0/0",
                "meta": {
                    "description": "Allows all users from any network authenticate as anonymous."
                }
            }
        ],
        "grants": [
            {
                "permissions": [
                    "wamp.register",
                    "wamp.unregister",
                    "wamp.subscribe",
                    "wamp.unsubscribe",
                    "wamp.call",
                    "wamp.cancel",
                    "wamp.publish"
                ],
                "uri": "*",
                "roles": "all"
            },
            {
                "permissions": [
                    "wamp.register",
                    "wamp.unregister",
                    "wamp.subscribe",
                    "wamp.unsubscribe",
                    "wamp.call",
                    "wamp.cancel",
                    "wamp.publish"
                ],
                "uri": "*",
                "roles": [
                    "anonymous"
                ]
            }
        ]
    }
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

This snippet allows any user (from any network) to authenticate to Bondy using anonymous authentication and perform all operations.

WARNING

For production use make sure you understand Bondy's Security system and configure it accordingly.

3. Prepare the bondy.conf file

Again using your text editor create a file name bondy.conf in the etc directory we created in the previous steps, containing the following content:

text
security.config_file = /bondy/etc/security_config.json
1

4. Verify your setup

bash
cd ~/bondy-docker
tree -L 2
1
2

You should get the following output:

bash
└── etc
    ├── bondy.conf
    ├── security.config.json
1
2
3

5. Run Bondy

We will run an official Bondy Docker image using the docker run command with an image name using the following syntax: leapsight/bondy:{VERSION}[-{VARIANT}] where:

  • {VERSION} can be master, develop or a tag like 1.0.0-beta.56
  • {VARIANT} can be null or slim (we will provide the alpine variant in the future).

For example to run the 1.0.0-beta.64 release you would use:

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-ShareAlike (CC-BY-SA) 4.0 International license.
Bondy and Leapsight are registered trademarks.