uhppoted / uhppoted-mqtt

Go MQTT endpoint for the UHPPOTE UT0311 TCP/IP access controller boards
MIT License
8 stars 2 forks source link

Docker build? #13

Closed YBonline closed 1 year ago

YBonline commented 1 year ago

I was wondering if there is any prebuilt docker containers for this package? I am running it directly on my hardware now without issues, but trying to build the docker container seems like I need to figure out a bunch of dependencies, and before I bothered I was wondering if a repository of that is maintained anywhere.

uhppoted commented 1 year ago

Hi,

There isn't a prebuilt Docker container, but there is a Dockerfile that I use for testing in the uhppoted project:

You would need to:

Easiest way to get started is probably just to recursively clone uhppoted and then run make docker, but that will pull down a whole bunch of stuff you don't need and also build a whole bunch of stuff you don't need.

I'll add it to the TODO list for uhppoted-mqtt but it's going to take a couple days (bit snowed under at the moment).

uhppoted commented 1 year ago

Ok, just to simplify things a bit, I've copied the Dockerfile stuff from the umbrella project and added the Makefile targets to create a Docker container. To use it:

  1. Pull the latest and greatest from the master branch.
  2. Copy your own keys, certificates and uhppoted.conf file into the docker directory.
  3. Run make docker
  4. make docker-run will start the container.

I still need to do a ton of work around making it a bit more generic and a whole lot less specific to my local system, but hopefully that should at least get you started :-).

uhppoted commented 1 year ago

Added README and simplified the Dockerfile and uhppoted.conf to start with a the most basic configuration. The README has instructions for upgrading to:

  1. TLS connection
  2. TLS connection with client authentication
  3. Encryption and signing when using a public broker

Am going to close this - hopefully this is enough information to get anybody started and since every image will require a different configuration for (at minimum) the broker am not sure it makes sense to provide an actual base Docker image.

Feel free to reopen if you think otherwise :-).