Closed 9868-08 closed 3 years ago
my solution: i got /etc/ssl/certs/ca-certificates.crt and use it in Dockerfile:
FROM python:3.4-alpine ENV REFRESHED_AT 2020091811 ENV CONFIG_FILE /config.yml RUN apk update && apk upgrade && apk add ca-certificates && rm -rf /var/cache/apk/* COPY requirements.txt /zabbix-cachet/requirements.txt RUN pip3 install -r /zabbix-cachet/requirements.txt COPY ca-certificates.crt /usr/local/lib/python3.4/site-packages/certifi/cacert.pem RUN update-ca-certificates WORKDIR /opt/ COPY zabbix-cachet.py /zabbix-cachet/zabbix-cachet.py CMD ["python", "/zabbix-cachet/zabbix-cachet.py"]
I've not try but think that setting REQUESTS_CA_BUNDLE
env variable should help too.
https://requests.readthedocs.io/en/master/user/advanced/#ssl-cert-verification
docker rm -f zabbix-cachet;docker run --name zabbix-cachet -v //config.yml:/config.yml qk4l/zabbix-cachet
zabbix-cachet
2020-09-16 06:32:42 INFO: (MainThread) Zabbix Cachet v.1.3.7 started
2020-09-16 06:32:42 INFO: (MainThread) JSON-RPC Server Endpoint: https://zabbix..ru/api_jsonrpc.php
2020-09-16 06:32:42 ERROR: (MainThread) HTTPSConnectionPool(host='zabbix..ru', port=443): Max retries exceeded with url: /api_jsonrpc.php (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),))