Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Docker support

Jeremy Fry edited this page Mar 23, 2017 · 4 revisions

Using docker

In order to use the prebuilt Docker container published on the Docker Hub, just run:

$ docker run -p 1883:1883 -p 80:80 -v /var/db/mosca:/db matteocollina/mosca

The command line above will persist your data in the /var/db/mosca directory of the host. You should create that folder.

You can find all the available images at: https://hub.docker.com/r/matteocollina/mosca/

Build

If you want to build your Mosca container, just clone this repository and run $ docker build .. This will create a container that run Mosca with a levelup-based database.

In order to build the container, you should:

$ git clone https://github.com/mcollina/mosca.git
$ cd mosca
$ docker build -t mosca:dev .

In order to run the Mosca container you should:

$ docker run -p 1883:1883 -p 80:80 -v /var/db/mosca:/db mosca:dev

Windows only: You cannot map /db to a host directory. LevelDB uses nmap which is not compatible with a volume shared to a Windows host.

The command line above will persist your data in the /var/db/mosca directory of the host.