CounterFit-IoT / CounterFit

A simulator for IoT sensors and actuators. This creates fake virtual sensors and actuators when the real ones won't fit on your counter 🤪.
MIT License
200 stars 65 forks source link

Run CounterFit in docker container #13

Closed buzzsurfr closed 2 years ago

buzzsurfr commented 2 years ago

Before writing a PR to make CounterFit work in docker--is there any reason NOT to do so? It looks like all of the emulation happens through the socket through the CounterFit library.

I've already patched a container to work as well--I'm now testing with some of the sensors and actuators to make sure it doesn't inhibit functionality.

I also recognize that it's fairly easy to get started with CounterFit and you'd need the same packages installed whether or not it runs in docker. My specific use case is that I setup a number of virtualenvs and want to simplify the process by orchestrating a container (one line and simpler install vs two lines + installation).

jimbobbennett commented 2 years ago

Apologies - I missed this.

Go for it! There's no reason not to have docker as an alternative to installing the Python application. As long as we support both, for those folks who don't use docker.

jimbobbennett commented 2 years ago

Docker container created!

docker pull jimbobbennett/counterfit:latest

When you run this, you need to map port 5000 to a port on your localhost.

More details and the docker file is here: https://github.com/CounterFit-IoT/counterfit-docker-container