Skip to content

Commit

Permalink
Add Dockerfile and usage information
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedeldi committed Nov 5, 2024
1 parent 228ed63 commit e4b7c20
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# syntax=docker/dockerfile:1

FROM python:3-alpine

WORKDIR /usr/src/app
COPY main.py models.json requirements.txt .

RUN apk add --no-cache build-base net-snmp net-snmp-dev
RUN pip install --no-cache-dir -r requirements.txt

ENTRYPOINT ["python", "main.py"]
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ Once the log has been found, you can use `wicreset.py <path to log>` to automati

If the structure is similar to other printers and the results look sane, please add the model to `models.json` and submit a pull request.

## Usage

Run: `python main.py` (interactive) or `python main.py [host] [model ...]` (command-line arguments)

See `python main.py --help` for more information.

Parse WICReset logs: `wicreset.py <path to log>`

### Docker

A minimal Dockerfile is provided to easily build an image with the relevant `net-snmp` packages installed.

Build: `docker build -t "epson-printer-snmp" .`

Run: `docker run -it --rm "epson-printer-snmp"`

## Libraries

- [easysnmp](https://pypi.org/project/easysnmp/) - SNMP
Expand Down

0 comments on commit e4b7c20

Please sign in to comment.