From f8d26fa93d42785e82dc361bb225d4c43e3ce42e Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Wed, 12 Apr 2023 16:47:01 +0200 Subject: [PATCH] initial commit --- .gitignore | 1 + Dockerfile | 10 ++++++++++ Makefile | 15 +++++++++++++++ README.md | 4 ++++ entrypoint.sh | 8 ++++++++ 5 files changed, 38 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 Makefile create mode 100644 README.md create mode 100755 entrypoint.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7d36e93 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM registry.opensuse.org/opensuse/tumbleweed:latest + +ARG VERSION + +RUN zypper --non-interactive install \ + openssh-clients \ + restic-${VERSION} \ + && zypper clean -a +ADD entrypoint.sh /usr/local/bin/entrypoint.sh +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3060399 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +.PHONY: default build + +-include .env + +VERSION=0.15.1-1.2 + +SHELL := /bin/bash + +default: build + +build: + podman build --build-arg VERSION=$(VERSION) --tag docker.io/bardak/restic:$(VERSION) . + +push: + podman push --creds $(USERNAME):$(PASSWORD) docker.io/bardak/restic:$(VERSION) diff --git a/README.md b/README.md new file mode 100644 index 0000000..7216ce1 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# restic container + +tumbleweed based container with restic to get sftp work + diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..7e0a69e --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# + +if [[ "$1" == "bash" ]]; then + exec /usr/bin/bash +else + restic "$@" +fi