From 30b2c20b51d694b1d448ac305561984465bedbf8 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Fri, 10 Nov 2023 14:52:59 +0000 Subject: [PATCH] Reinstate Docker image --- .drone.yml | 23 +++++++++++++++-------- Dockerfile | 10 ++++++++++ 2 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml index e2f0fe8..9539ea4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,11 +2,18 @@ kind: pipeline name: linters steps: - - name: run shellcheck - image: koalaman/shellcheck-alpine - commands: - - shellcheck backup.sh - -trigger: - branch: - - main + - name: publish image + image: plugins/docker + settings: + username: 3wordchant + password: + from_secret: git_coopcloud_tech_token_3wc + repo: git.coopcloud.tech/coop-cloud/backup-bot-two + tags: 2.0.0 + registry: git.coopcloud.tech + depends_on: + - run shellcheck + when: + event: + exclude: + - pull_request diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ba47a7d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM docker:24.0.7-dind + +RUN apk add --upgrade --no-cache restic bash python3 py3-pip + +# Todo use requirements file with specific versions +RUN pip install click==8.1.7 docker==6.1.3 resticpy==1.0.2 + +COPY backupbot.py /usr/bin/backup + +ENTRYPOINT /bin/bash