first commit of rotate-backups container
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
James Brumond 2023-08-15 18:04:11 -07:00
commit 9f142c15e4
Signed by: james
GPG Key ID: E8F2FC44BAA3357A
4 changed files with 41 additions and 0 deletions

17
.drone.yml Normal file
View File

@ -0,0 +1,17 @@
---
kind: template
load: multiarch-container.yaml
data:
repo: images/rotate-backups
build_args:
- PYTHON_VERSION=3
- ALPINE_VERSION=3.18
- ROTATE_BACKUPS_VERSION=8.1
tags:
- "8.1"
- "8"
platforms:
- os: linux
arch: arm64
- os: linux
arch: amd64

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
ARG PYTHON_VERSION=3
ARG ALPINE_VERSION=3.18
ARG ROTATE_BACKUPS_VERSION=latest
FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION}
RUN apk update && apk add less
RUN pip install rotate-backups==${ROTATE_BACKUPS_VERSION}
RUN mkdir /data
COPY rotate.sh /opt/rotate.sh
RUN chmod +x /opt/rotate.sh
ENTRYPOINT ["/opt/rotate.sh"]
CMD ["--help"]

4
readme.md Normal file
View File

@ -0,0 +1,4 @@
# `rotate-backups` in a container image

2
rotate.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
/usr/local/bin/rotate-backups "$@" /data