stephanediondev / elasticsearch-admin

Web administration for Elasticsearch (2.x to 8.x): cluster, nodes, indices, shards, index templates, repositories, snapshots ...
https://stephanediondev.github.io/elasticsearch-admin/
MIT License
91 stars 9 forks source link

Docker image is failing (missing 'pkg_resources') #33

Closed joaocarmo closed 3 years ago

joaocarmo commented 3 years ago

Attempting to start a container of the docker image stephanediondev/elasticsearch-admin fails with the error below.

$ docker pull stephanediondev/elasticsearch-admin
$ docker run -it stephanediondev/elasticsearch-admin sh
/var/www/html $ /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
Traceback (most recent call last):
  File "/usr/bin/supervisord", line 33, in <module>
    sys.exit(load_entry_point('supervisor==4.2.2', 'console_scripts', 'supervisord')())
  File "/usr/bin/supervisord", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/supervisor/supervisord.py", line 41, in <module>
    from supervisor.options import ServerOptions
  File "/usr/lib/python3.8/site-packages/supervisor/options.py", line 13, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

I managed to get it working by cloning the repo and replacing this line on the Dockerfile:

- rm /etc/nginx/conf.d/default.conf
+ rm -f /etc/nginx/conf.d/default.conf

Otherwise, it would fail to build:

#5 130.4 rm: can't remove '/etc/nginx/conf.d/default.conf': No such file or directory

I believe the docker image needs to be updated in dockerhub.

stephanediondev commented 3 years ago

Thanks for the feedback

I made a new release and build again on Docker Hub

Should be ok now

joaocarmo commented 3 years ago

@stephanediondev works perfectly now, thanks for the prompt response!