Initial commit
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
FROM ubuntu:jammy
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV TZ=Europe/Moscow
|
||||||
|
|
||||||
|
ADD docker-entrypoint.sh /software/entrypoint.sh
|
||||||
|
ADD plextraktsync.sh /software/plextraktsync.sh
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
apt update && \
|
||||||
|
apt install -y apt apt-utils && \
|
||||||
|
apt upgrade -y && \
|
||||||
|
apt install -y tini python3 python3-pip python3-venv python-is-python3 pipx nano curl wget && \
|
||||||
|
apt autoremove --purge -y && apt clean -y && rm-rf /tmp/* && \
|
||||||
|
pipx install plextraktsync && \
|
||||||
|
chmod +x /software/*.sh
|
||||||
|
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
|
ENTRYPOINT [ "tini", "--" ]
|
||||||
|
CMD ["bash", "/software/entrypoint.sh"]
|
||||||
16
build.sh
Normal file
16
build.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
export DATE=$(date '+%Y-%m-%d')
|
||||||
|
export IMAGENAME=plextraktsync
|
||||||
|
export OLDDATE=$(cat .build)
|
||||||
|
|
||||||
|
#docker stop officeproxy
|
||||||
|
#docker rm officeproxy
|
||||||
|
docker rmi registry.ghostklart.com/dtibragimov/$IMAGENAME:$OLDDATE -f
|
||||||
|
|
||||||
|
touch .build
|
||||||
|
echo $DATE > .build
|
||||||
|
|
||||||
|
docker build -t registry.ghostklart.com/dtibragimov/$IMAGENAME:$DATE .
|
||||||
|
docker tag registry.ghostklart.com/dtibragimov/$IMAGENAME:$DATE registry.ghostklart.com/dtibragimov/$IMAGENAME:latest
|
||||||
|
echo "y" | docker system prune
|
||||||
|
docker push registry.ghostklart.com/dtibragimov/$IMAGENAME -a
|
||||||
9
docker-entrypoint.sh
Normal file
9
docker-entrypoint.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# set profile things
|
||||||
|
echo 'export PATH=$PATH:/root/.local/bin' >> /root/.profile
|
||||||
|
echo 'export HOMEFOLDER=/software' >> /root/.profile
|
||||||
|
source ~/.profile
|
||||||
|
|
||||||
|
# dont shutdown
|
||||||
|
while true; do /software/plextraktsync.sh; sleep 86400; done
|
||||||
5
plextraktsync.sh
Normal file
5
plextraktsync.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
/root/.local/bin/plextraktsync self-update
|
||||||
|
|
||||||
|
/root/.local/bin/plextraktsync sync
|
||||||
Reference in New Issue
Block a user