FROM docker.io/python:3.12-alpine

RUN apk fix && \
	apk add --no-cache \
		ca-certificates \
		openssh \
		gpg \
		gpg-agent \
		librsync
# install dev version of duplicity change URL or comment out
RUN pip install setuptools_scm boto3 python-gettext &&\
	apk add gettext &&\
	apk add -t .build-deps linux-headers python3-dev librsync-dev gcc musl-dev git &&\
	pip install --upgrade netifaces &&\
	pip install https://gitlab.com/duplicity/duplicity/-/archive/dev/duplicity-dev.tar.bz2 &&\
	apk del --purge .build-deps
