commit 411cb2be6ab5c2c81f4bf1fbac32ea29bb957643 Author: nikurasu Date: Sun Jan 21 17:22:51 2024 +0100 feat(Inital Commit): Initial Commit UwU Add borg backup, dev-alpine, download-tools docker diff --git a/borgbackup_alpine_runner/Dockerfile b/borgbackup_alpine_runner/Dockerfile new file mode 100644 index 0000000..e37e0fa --- /dev/null +++ b/borgbackup_alpine_runner/Dockerfile @@ -0,0 +1,5 @@ +FROM alpine:3.19 +RUN apk --no-cache add openssh borgbackup bash tzdata +COPY ./run_borg.sh /run_borg.sh +VOLUME [ "/backup", "/ssh_privKey" ] +CMD /run_borg.sh -d $BKP_DIR -u $USER -s $SERVER -r $REPOSITORY -n $BACKUPNAME diff --git a/borgbackup_alpine_runner/run_borg.sh b/borgbackup_alpine_runner/run_borg.sh new file mode 100755 index 0000000..afb4a78 --- /dev/null +++ b/borgbackup_alpine_runner/run_borg.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +while getopts d:u:s:r:n: flag +do + case "${flag}" in + d) bkp_dir=${OPTARG};; + u) user=${OPTARG};; + s) server=${OPTARG};; + r) repository=${OPTARG};; + n) backupname=${OPTARG};; + esac +done +echo "Copy ssh priv key" +mkdir $HOME/.ssh +mkdir /logs +cp /ssh_privKey $HOME/.ssh/id_rsa +chown $(id -u):$(id -g) $HOME/.ssh/id_rsa +ssh-keyscan -t rsa $SERVER >> ~/.ssh/known_hosts +echo "Borg starting" +echo $(date +%s) > /logs/starttime +borg create -C lzma ${user}@${server}:${bkp_dir}${repository}::${backupname}_$(date -I'minutes') /backup +exitCode=$? +echo $(date +%s) > /logs/endtime \ No newline at end of file diff --git a/dev-images/alpine-dev/Dockerfile b/dev-images/alpine-dev/Dockerfile new file mode 100644 index 0000000..700db01 --- /dev/null +++ b/dev-images/alpine-dev/Dockerfile @@ -0,0 +1,8 @@ +FROM alpine:3.17 +RUN apk add build-base bash go +RUN go install -tags extended github.com/gohugoio/hugo@latest +RUN useradd -ms /bin/bash tamaki +USER tamaki +WORKDIR /home/tamaki +VOLUME [ "/home/tamaki/coding", "/home/tamaki/.gitconfig", "/home/tamaki/.ssh" ] +EXPOSE 8080 8000 1313 \ No newline at end of file diff --git a/downloadtools_docker/Dockerfile b/downloadtools_docker/Dockerfile new file mode 100644 index 0000000..2fc050b --- /dev/null +++ b/downloadtools_docker/Dockerfile @@ -0,0 +1,9 @@ +FROM fedora:36 +RUN dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y +RUN dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel lame\* --exclude=lame-devel ffmpeg python3-pip -y util-linux +RUN dnf group install --with-optional Multimedia -y +RUN useradd -ms /bin/bash media +USER media +RUN pip install yt-dlp --user +WORKDIR /home/media +ENTRYPOINT /bin/bash \ No newline at end of file