-
-
Notifications
You must be signed in to change notification settings - Fork 508
Docker support
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/
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.