From f860eba8a23a32802c3b76d834757ef1dd39ea95 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 17 Apr 2023 14:12:51 +0200 Subject: [PATCH] fixed entrypoint and using tumbleweed version instead of restic verson as tag --- Dockerfile | 11 +++++++---- Makefile | 2 +- entrypoint.sh | 10 +++++----- 3 files changed, 13 insertions(+), 10 deletions(-) mode change 100755 => 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 7d36e93..661bc03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ -FROM registry.opensuse.org/opensuse/tumbleweed:latest - ARG VERSION +FROM registry.opensuse.org/opensuse/tumbleweed:${VERSION} + RUN zypper --non-interactive install \ openssh-clients \ - restic-${VERSION} \ + restic \ && zypper clean -a -ADD entrypoint.sh /usr/local/bin/entrypoint.sh + +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +RUN chmod +x /usr/local/bin/entrypoint.sh ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +CMD ["start"] diff --git a/Makefile b/Makefile index 66b3842..d58da25 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ -include .env -VERSION=20230415 +VERSION=20230411 IMAGENAME=restic REPO=docker.io/bardak diff --git a/entrypoint.sh b/entrypoint.sh old mode 100755 new mode 100644 index 7e0a69e..33cda59 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,8 +1,8 @@ -#!/bin/bash -# +#!/usr/bin/env bash -if [[ "$1" == "bash" ]]; then - exec /usr/bin/bash + +if [[ "$1" == "start" ]]; then + /usr/bin/restic "$@" else - restic "$@" + exec "$@" fi