feat(Inital Commit):
Initial Commit UwU Add borg backup, dev-alpine, download-tools docker
This commit is contained in:
commit
411cb2be6a
4 changed files with 44 additions and 0 deletions
5
borgbackup_alpine_runner/Dockerfile
Normal file
5
borgbackup_alpine_runner/Dockerfile
Normal file
|
@ -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
|
22
borgbackup_alpine_runner/run_borg.sh
Executable file
22
borgbackup_alpine_runner/run_borg.sh
Executable file
|
@ -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
|
8
dev-images/alpine-dev/Dockerfile
Normal file
8
dev-images/alpine-dev/Dockerfile
Normal file
|
@ -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
|
9
downloadtools_docker/Dockerfile
Normal file
9
downloadtools_docker/Dockerfile
Normal file
|
@ -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
|
Loading…
Reference in a new issue