From 4848fa0c0e8980fcd7ee027939cb0d25b891b07b Mon Sep 17 00:00:00 2001 From: Andrew Davidson Date: Wed, 30 Aug 2023 22:38:33 -0700 Subject: [PATCH] moving to alpine, fixing build closes #2 --- Dockerfile | 12 ++++++------ Pipfile | 4 ++-- bin/archivist.sh | 2 +- build.sh | 5 +++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 51112ff..1707f93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,18 @@ -FROM fedora:34 +FROM alpine -RUN dnf install -y python3-pip which \ -&& dnf clean all \ -&& pip3 install pipenv +RUN apk add py3-pip gcc python3-dev musl-dev libgit2 libgit2-dev + +RUN pip install pipenv VOLUME /backups COPY . /archivist -RUN touch /archivist/archivist.yml +#RUN touch /archivist/archivist.yml WORKDIR /archivist RUN pipenv install -ENTRYPOINT ["/archivist/bin/archivist.sh"] +CMD ["/archivist/bin/archivist.sh"] diff --git a/Pipfile b/Pipfile index ff2c175..499c864 100644 --- a/Pipfile +++ b/Pipfile @@ -4,7 +4,7 @@ verify_ssl = true name = "pypi" [packages] -pygit2 = "*" +pygit2 = "1.11.*" requests = "*" pyyaml = "*" imapclient = "*" @@ -12,4 +12,4 @@ imapclient = "*" [dev-packages] [requires] -python_version = "3.9" +python_version = "3.11" diff --git a/bin/archivist.sh b/bin/archivist.sh index 4fe9780..a31e02f 100755 --- a/bin/archivist.sh +++ b/bin/archivist.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh CURRENTDIR="$(dirname "$0")" ROOT_DIR="$CURRENTDIR/.." diff --git a/build.sh b/build.sh index b705d62..60d0f25 100644 --- a/build.sh +++ b/build.sh @@ -12,9 +12,10 @@ docker buildx create --use --name builder echo "### MARK BUILD" -docker buildx build --push \ - --platform linux/amd64,linux/arm64,linux/arm/v7 \ +docker buildx build \ + --platform linux/amd64 \ -t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME \ -t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:latest \ -t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:$(date -I) \ . + #--platform linux/amd64,linux/arm64,linux/arm/v7 \