| # debian.sh --arch 'amd64' out/ 'bookworm' '@1783900800' |
| RUN /bin/sh -c apt-get update && apt-get install -y openvpn rsync smbclient cifs-utils openssh-client cron supervisor python3 python3-pip python3-venv iproute2 && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/sh -c python3 -m venv /opt/venv # buildkit |
| RUN /bin/sh -c /opt/venv/bin/pip install --no-cache-dir fastapi uvicorn # buildkit |
| RUN /bin/sh -c /opt/venv/bin/pip install --no-cache-dir "fastapi==0.111.0" "uvicorn==0.29.0" "starlette==0.37.2" "jinja2==3.1.4" "python-multipart==0.0.9" # buildkit |
| RUN /bin/sh -c mkdir -p /var/log/sync /app/web/templates /app/scripts # buildkit |
| RUN /bin/sh -c mkdir -p /var/log/sync /var/log/supervisor /app/web/templates /app/scripts # buildkit |
| COPY scripts/ /app/scripts/ # buildkit |
| COPY web/app.py /app/web/app.py # buildkit |
| COPY web/templates/ /app/web/templates/ # buildkit |
| COPY supervisord.conf /etc/supervisor/conf.d/rsync-stephan.conf # buildkit |
| RUN /bin/sh -c chmod +x /app/scripts/sync.sh # buildkit |
| RUN /bin/sh -c echo "0 */6 * * * root /app/scripts/sync.sh >> /var/log/sync/sync.log 2>&1" > /etc/cron.d/sync-stephan && chmod 0644 /etc/cron.d/sync-stephan # buildkit |
| COPY entrypoint.sh /entrypoint.sh # buildkit |
| RUN /bin/sh -c chmod +x /entrypoint.sh # buildkit |
| WORKDIR /app |
| EXPOSE [8080/tcp] |
| CMD ["/entrypoint.sh"] |