Tecnativa/docker-duplicity

Update to latest duplicity version

alexanderhofstaetter opened this issue · 3 comments

The version used in the Dockerfile is pretty old - any plans on updating this?

I tried to set the DUPLICITY_VERSION var to 0.8.12. However, the image did not build.

Step 11/31 : RUN apk add --no-cache         ca-certificates         dbus         gnupg         krb5-libs         lftp         libffi         librsync         ncftp         openssh         openssl         py2-gobject3         tzdata     && sync
 ---> Running in 0c60e4fd6984
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  py2-gobject3 (missing):
    required by: world[py2-gobject3]
ERROR: Service 'backup-docker-host' failed to build: The command '/bin/sh -c apk add --no-cache         ca-certificates         dbus         gnupg         krb5-libs         lftp         libffi         librsync         ncftp         openssh         openssl         py2-gobject3         tzdata     && sync' returned a non-zero code: 1

Maybe there are some problems with python packages?

yajo commented

Well... just didn't have the time to do so. PRs welcome 😊

I noticed duplicity is now 0.8.17, upgraded since #43 so this can be closed?

@joao-p-marques @yajo I have no idea how the new setup works with poetry as with 4519f62:

Dependency solving is now handled by poetry locally and pinned in lock
file and exported to requirements.txt

Could you provide a few lines in the README how others could enable this to contribute, i.e. when a new duplicity version comes available or if the Azure package upgrades their dependencies? Tbh I would have no idea atm how to change what files to get this fixed in this package, as the requirements.txt seems to be generated now.

@juriansluiman thanks for the interest in contributing. Indeed, that part is not very well documented.

We decided to use poetry to solve the packages dependencies versions instead of plain pip to try to avoid dependency conflicts that came with the new pip resolver.

Basically, instead of just adding a particular dependency in requirements.txt, you can now:

  1. Add the dependency to the poetry project with poetry add PACKAGE
  2. Export the poetry-resolved list packages to the requirements.txt file: poetry export -o requirements.txt

The requirements.txt is what is then passed to the docker image and is used to install the packages. This increases resilience in the process as we can pin specific versions to avoid conflicts.