commit f8d26fa93d42785e82dc361bb225d4c43e3ce42e Author: Jonas Forsberg Date: Wed Apr 12 16:47:01 2023 +0200 initial commit 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