Skip to content

Commit

Permalink
New Image: qrcode (#23884)
Browse files Browse the repository at this point in the history
* init

* lock

* add zbar-tolls

* add zbar

* lock

* lock

* trigger build

* add build-essential

* use pipenv in build

* remove zbar

* undo change

* fix

* Remove PIL

* Add cv2

* Remove unnecessary file

* base opencv

* fix CVE problems

---------

Co-authored-by: Judah Schwartz <[email protected]>
  • Loading branch information
jlevypaloalto and JudahSchwartz authored Feb 4, 2024
1 parent 5b60778 commit b838317
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -677,3 +677,7 @@ updates:
- dependency-name: "pytmv1"
schedule:
interval: daily
- package-ecosystem: pip
directory: /docker/qrcode
schedule:
interval: daily
1 change: 1 addition & 0 deletions docker/qrcode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requirements.txt
17 changes: 17 additions & 0 deletions docker/qrcode/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

FROM demisto/opencv:1.0.0.85821
COPY Pipfile.lock .
COPY Pipfile .
RUN apt-get update && apt-get -t bullseye-backports install -y --no-install-recommends \
gcc \
python3-dev \
libzbar0 \
build-essential \
pipenv \
&& pipenv install --system \
&& apt-get purge -y --auto-remove \
gcc \
python3-dev \
pipenv \
build-essential \
&& rm -rf /var/lib/apt/lists/*
12 changes: 12 additions & 0 deletions docker/qrcode/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pyzbar = "*"

[dev-packages]

[requires]
python_version = "3.10"
30 changes: 30 additions & 0 deletions docker/qrcode/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docker/qrcode/build.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version=1.0.0
dont_generate_requirements=true
2 changes: 2 additions & 0 deletions docker/qrcode/verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from pyzbar.pyzbar import decode
import cv2

0 comments on commit b838317

Please sign in to comment.