bitsensor / elastalert

ElastAlert that exposes REST API's for manipulating rules and alerts
https://bitsensor.io/
Other
367 stars 216 forks source link

docker build hung up on configparser install #164

Open athornto2 opened 4 years ago

athornto2 commented 4 years ago

Docker build is failing at install of configparser. I've tried replacing the requirements.txt call with a custom list calling out an older version in case it was a versioning issue, but continues to attempt install of 5.0.

Ideas for how to make this dependency work or how to temporarily skip it?

Searching for configparser>=3.5.0 Reading https://pypi.org/simple/configparser/ Downloading https://files.pythonhosted.org/packages/e5/7c/d4ccbcde76b4eea8cbd73b67b88c72578e8b4944d1270021596e80b13deb/configparser-5.0.0.tar.gz#sha256=2ca44140ee259b5e3d8aaf47c79c36a7ab0d5e94d70bd4105c03ede7a20ea5a1 Best match: configparser 5.0.0 Processing configparser-5.0.0.tar.gz Writing /tmp/easy_install-bfIL3V/configparser-5.0.0/setup.cfg Running configparser-5.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-bfIL3V/configparser-5.0.0/egg-dist-tmp-CotrW6 error: Setup script exited with error: 'egg_base' must be a directory name (got src) The command '/bin/sh -c sed -i 's/jira>=1.0.10/jira>=1.0.10,<1.0.14/g' setup.py && python setup.py install && pip install apscheduler>=3.3.0 aws-requests-auth>=0.3.0 blist>=1.3.6 boto3>=1.4.4 cffi>=1.11.5 croniter>=0.3.16 elasticsearch>=7.0.0 envparse>=0.2.0 exotel>=0.1.3 "jira>=1.0.10,<1.0.15" jsonschema>=3.0.2 mock==3.0.5 prison>=0.1.2 py-zabbix==1.1.3 PyStaticConfiguration>=0.10.3 "python-dateutil>=2.6.0,<2.7.0" python-magic>=0.4.15 PyYAML>=5.1 requests>=2.0.0 stomp.py==4.1.23 texttable>=0.8.8 thehive4py>=1.4.4 twilio==6.0.0' returned a non-zero code: 1

athornto2 commented 4 years ago

Solution found, added line to keep configparser under version 5.0

RUN sed -i 's/jira>=1.0.10/jira>=1.0.10,<1.0.14/g' setup.py && \ sed -i 's/configparser>=3.5.0/configparser>=3.5.0,<5.0.0/g' setup.py && \ python setup.py install && \ pip install -r requirements.txt

boddumanohar commented 4 years ago

the above modification worked for me.