Skip to content

Commit

Permalink
Merge branch 'master' of nmakel.github.com:nmakel/solaredge_modbus
Browse files Browse the repository at this point in the history
  • Loading branch information
nmakel committed Sep 3, 2023
2 parents 9076618 + d30132e commit 003f297
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:3.8

RUN pip3 install pyserial

COPY . /app
WORKDIR /app
RUN python3 setup.py install

ENTRYPOINT [ "/usr/local/bin/python3", "example.py" ]
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,4 +378,23 @@ There are two points to consider when doing this. You will need to manually pass

## Contributing

Contributions are more than welcome.
Contributions are more than welcome.

## Using Docker to install and run solaredge_modbus

You can build a Docker image and run your scripts inside:

```sh
docker build -t solaredge_modbus .
```

You can then execute `example.py` as follows:
```sh
docker run --rm -it solaredge_modbus <host> <port>
```
You can explore the image or just use it to run other scripts by overriding the entrypoint to the docker image and mounting the outside directory over the `/app/` directory:
```sh
docker run --rm -it -v $PWD:/app --entrypoint /bin/bash solaredge_modbus

python3 examply.py <host> <port>
```

0 comments on commit 003f297

Please sign in to comment.