Update dockerfile, add requirements.txt and change dependabot

Update dockerfile and add requirements.txt:
This allows for easier management and allows for dependabot to auto-open a PR when the pip packages are updated lowering management time.

Have also added the option for chmod of the entry.sh to be done during the copy stage rather than later, allowing this step to be cached when required, lowering build time and layer size.
pull/113/head
modem7 2022-05-24 22:31:09 +01:00
rodzic 166d442b95
commit 3d6df84dac
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 780D7218B8D553A3
3 zmienionych plików z 20 dodań i 10 usunięć

Wyświetl plik

@ -8,3 +8,15 @@ updates:
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
# Maintain dependencies for Docker
- package-ecosystem: "docker" # See documentation for possible values
directory: "/base" # Location of package manifests
schedule:
interval: "daily"
# Maintain dependencies for PIP
- package-ecosystem: "pip"
directory: "/base"
schedule:
interval: "daily"

Wyświetl plik

@ -1,8 +1,6 @@
FROM alpine:3.15 as builder
LABEL mainainer='b3vis'
ARG BORG_VERSION=1.2.0
ARG BORGMATIC_VERSION=1.6.0
ARG LLFUSE_VERSION=1.4.1
COPY requirements.txt /requirements.txt
RUN apk upgrade --no-cache \
&& apk add --no-cache \
alpine-sdk \
@ -16,14 +14,11 @@ RUN apk upgrade --no-cache \
fuse-dev \
attr-dev \
py3-wheel \
&& pip3 install --upgrade pip \
&& pip3 install --upgrade borgbackup==${BORG_VERSION} \
&& pip3 install --upgrade borgmatic==${BORGMATIC_VERSION} \
&& pip3 install --upgrade llfuse==${LLFUSE_VERSION}
&& pip3 install --no-cache-dir -U -r requirements.txt
FROM alpine:3.15
LABEL mainainer='b3vis'
COPY entry.sh /entry.sh
COPY --chmod=755 entry.sh /entry.sh
RUN apk upgrade --no-cache \
&& apk add --no-cache \
tzdata \
@ -40,8 +35,7 @@ RUN apk upgrade --no-cache \
curl \
findmnt \
logrotate \
&& rm -rf /var/cache/apk/* \
&& chmod 755 /entry.sh
&& rm -rf /var/cache/apk/*
VOLUME /mnt/source
VOLUME /mnt/borg-repository
VOLUME /etc/borgmatic.d

Wyświetl plik

@ -0,0 +1,4 @@
pip==22.1.1
llfuse==1.4.1
borgbackup==1.2.0
borgmatic==1.6.0