ZettaIO / restic-compose-backup

Automatic restic backup of a docker-compose setup. https://hub.docker.com/r/zettaio/restic-compose-backup
MIT License
29 stars 16 forks source link

error upon starting: pkg_resources.DistributionNotFound: The 'restic-compose-backup' distribution was not found and is required by the application #24

Open clarity99 opened 4 years ago

clarity99 commented 4 years ago

I cloned the repo, edited the .env file and tried starting it with docker-compose up

I got this error:

backup_1  | Traceback (most recent call last):
backup_1  |   File "/usr/bin/rcb", line 6, in <module>
backup_1  |     from pkg_resources import load_entry_point
backup_1  |   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3252, in <module>
backup_1  |     @_call_aside
backup_1  |   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3236, in _call_aside
backup_1  |     f(*args, **kwargs)
backup_1  |   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3265, in _initialize_master_working_set
backup_1  |     working_set = WorkingSet._build_master()
backup_1  |   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 584, in _build_master
backup_1  |     ws.require(__requires__)
backup_1  |   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 901, in require
backup_1  |     needed = self.resolve(parse_requirements(requirements))
backup_1  |   File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 787, in resolve
backup_1  |     raise DistributionNotFound(req, requirers)
backup_1  | pkg_resources.DistributionNotFound: The 'restic-compose-backup' distribution was not found and is required by the application
backup_1  | crond 4.5 dillon's cron daemon, started with loglevel notice`

looking at the output from build phase, I see this: Could not build wheels for restic-compose-backup, since package 'wheel' is not installed.

einarf commented 4 years ago

Probably a silly thing that is easy enough to fix. I'll take a look.

einarf commented 4 years ago

You could pull and try build with --no-cache option.

What OS are you on?

clarity99 commented 4 years ago

ubuntu 16.04

I've fixed it by changing Dockerfile: diff --git a/src/Dockerfile b/src/Dockerfile index 00ab72c..946aec3 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -5,6 +5,7 @@ RUN apk update && apk add python3 dcron mariadb-client postgresql-client ADD . /restic-compose-backup WORKDIR /restic-compose-backup RUN pip3 install -U pip setuptools && pip3 install -e . +RUN pip3 install -e . ENV XDG_CACHE_HOME=/cache

No idea really what I am doing, as I have no clue about python, but this seems to work.

einarf commented 4 years ago

Seems like a harmless change. If it works, it works. I should probably separate the Dockerfile used in dev and prod to resolve this fully