Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM alpine:latest

RUN apk add --update --no-cache --virtual .build-deps \
git

RUN apk add --update --no-cache \
fontconfig \
py3-pillow \
py3-future \
py3-jinja2 \
py3-bottle \
python3 \
ttf-dejavu \
py3-pip \
poppler-utils

RUN ln -s /usr/bin/python3 /usr/bin/python
RUN git clone --depth=1 https://github.com/tbnobody/brother_ql_web.git

WORKDIR /brother_ql_web

RUN rm -r .git
RUN python3 -m venv .venv
RUN source .venv/bin/activate
RUN pip3 install -r requirements.txt
RUN apk del .build-deps

EXPOSE 8013

CMD [ "./run.py", "--model", "QL-580N", "tcp://192.168.5.169" ]
15 changes: 15 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Running via docker

First build the docker image and name it `brother_ql_web`, which only needs doing once.

1. `cd docker`
1. `docker build -t brother_ql_web .`

> _don't miss the dot at the end!_

To run the image:

1. `docker run -it --rm -p 127.0.0.1:8013:8013 brother_ql_web ./run.py --model <MODEL> <FILE>`

> replacing <MODEL> with your printers model, and <FILE> with your printers connection file/network e.g. `tcp://192.168.5.169` or `file:///dev/usb/lp0`
1. Open http://localhost:8013/ in your web browser