Я пытаюсь создать docker образ с помощью следующего файла require.txt, но когда я вызываю мою функцию python, есть часть, которая вызывает базу данных красного смещения для выполнения запроса и извлечения данных, а затем я получаю ошибка:
ImportError: /usr/local/lib/python2.7/site-packages/psycopg2/.libs/libresolv-2-c4c53def.5.so: символ __res_maybe_init версия GLIBC_PRIVATE не определена в файл lib c .so.6 с указанием времени ссылки
python-dateutil==2.6.0
numpy==1.12.0
jsonschema==2.6.0
pandas==0.20.3
python-consul==0.7.2
boto==2.49.0
datadog==0.15.0
invoke==1.4.1
SQLAlchemy==1.1.5
graypy==0.2.14
llvmlite==0.31.0
fastparquet==0.2.1
simple-salesforce==0.74.2
pytz==2019.1
psycopg2==2.7.1
Мой docker файл:
FROM python:2.7
ENV COLLECTION aa
ENV TASK_PARAMS aa
RUN apt-get update -y && \
apt-get install -y python-pip python-dev
WORKDIR /opt/airflow_repository
ADD analytics ./analytics
ADD FrameworkPY ./FrameworkPY
COPY requirements.txt requirements.txt
ENV PYTHONPATH ${PYTHONPATH}:/opt/airflow_repository/similarweb_analytics
ENV INI_ENVIRONMENT_SETTINGS_PATH=/etc/
RUN pip install -r requirements.txt
CMD invoke -c $COLLECTION mainrun $TASK_PARAMS
после создания образа docker, который я пытаюсь запустить python скрипт, который считывает данные из моего красного смещения: Используя следующий cmd: docker запустите -it -e COLLECTION = / opt / airflow_repository / ods / sf / sf_to_ods -e TASK_PARAMS = "- job-type / opt / airflow_repository / ods / sf / configs / sf_contact_delta. json "airflow_bidev
я получаю следующую трассировку ошибки:
pid 6 - 2020-04-29 20:34:27,083 - INFO - sf_to_ods.py - run - line 60 - starting sf_to_ods
Setting value
pid 6 - 2020-04-29 20:34:27,087 - INFO - consul_connections.py - get_connection_settings - line 15 - retreving general_settings connection settings from consul
pid 6 - 2020-04-29 20:34:28,412 - INFO - consul_connections.py - get_connection_settings - line 15 - retreving sf connection settings from consul
pid 6 - 2020-04-29 20:34:29,003 - INFO - consul_connections.py - get_connection_settings - line 15 - retreving etl connection settings from consul
pid 6 - 2020-04-29 20:34:29,314 - ERROR - sf_to_ods.py - run - line 165 - /usr/local/lib/python2.7/site-packages/psycopg2/.libs/libresolv-2-c4c53def.5.so: symbol __res_maybe_init version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
Traceback (most recent call last):
File "/usr/local/bin/invoke", line 8, in <module>
sys.exit(program.run())
File "/usr/local/lib/python2.7/site-packages/invoke/program.py", line 384, in run
self.execute()
File "/usr/local/lib/python2.7/site-packages/invoke/program.py", line 566, in execute
executor.execute(*self.tasks)
File "/usr/local/lib/python2.7/site-packages/invoke/executor.py", line 129, in execute
result = call.task(*args, **call.kwargs)
File "/usr/local/lib/python2.7/site-packages/invoke/tasks.py", line 127, in __call__
result = self.body(*args, **kwargs)
File "//opt/airflow_repository/similarweb_analytics/ods/sf/sf_to_ods.py", line 244, in mainrun
run(**module_config_)
File "/opt/airflow_repository/FrameworkPY/vbi_utils/decorating_utils.py", line 89, in wrapped_func
res = func(*args, **utils.get_config_dict_from_path(**kwargs))
File "/opt/airflow_repository/FrameworkPY/vbi_utils/decorating_utils.py", line 100, in wrapped_func
res = func(*formatted_args, **formatted_kwargs)
File "/opt/airflow_repository/FrameworkPY/vbi_utils/decorating_utils.py", line 79, in wrapped_func
res = func(*args, **kwargs)
File "//opt/airflow_repository/similarweb_analytics/ods/sf/sf_to_ods.py", line 70, in run
kwargs = results_container.get_increment(**kwargs)
File "/opt/airflow_repository/similarweb_analytics/results_container/results_container.py", line 342, in get_increment
kwargs.update(inc_util.get_from_val(**kwargs))
File "/opt/airflow_repository/similarweb_analytics/sw_utils/increment_utils.py", line 25, in get_from_val
if not kv.get(**kwargs):
File "/opt/airflow_repository/FrameworkPY/fw_utils/key_val.py", line 80, in get
engine_ = alch_engine.create_engine(config_.get(DB_ENGINE))
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 387, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 80, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 554, in dbapi
import psycopg2
File "/usr/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 50, in <module>
from psycopg2._psycopg import ( # noqa
ImportError: /usr/local/lib/python2.7/site-packages/psycopg2/.libs/libresolv-2-c4c53def.5.so: symbol __res_maybe_init version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference