added shell entrypoint

This commit is contained in:
2025-01-24 23:38:07 +00:00
parent f4f19f689b
commit 8e33c44504
3 changed files with 16 additions and 5 deletions

View File

@@ -4,8 +4,12 @@ services:
build: build:
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
context: ../ context: ../
command: ${COMMAND}
environment: environment:
- APP_ENV=${APP_ENV} - APP_ENV=${APP_ENV}
- PBS_PASSWORD=${PBS_PASSWORD} - PBS_PASSWORD=${PBS_PASSWORD}
- PBS_REPOSITORY=${PBS_REPOSITORY} - PBS_REPOSITORY=${PBS_REPOSITORY}
- PBS_FINGERPRINT=${PBS_FINGERPRINT} - PBS_FINGERPRINT=${PBS_FINGERPRINT}
- MODE=${MODE}

View File

@@ -6,6 +6,6 @@ RUN wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /
RUN echo "deb http://download.proxmox.com/debian/pbs-client bookworm main" > /etc/apt/sources.list.d/pbs.list RUN echo "deb http://download.proxmox.com/debian/pbs-client bookworm main" > /etc/apt/sources.list.d/pbs.list
RUN apt update RUN apt update
RUN apt install -y proxmox-backup-client RUN apt install -y proxmox-backup-client
COPY ./docker/scripts/entrypoint.sh /entrypoint.sh COPY ./docker/scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ] ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]

9
pbsclient/docker/scripts/entrypoint.sh Normal file → Executable file
View File

@@ -1,3 +1,10 @@
#!bin/bash #!/bin/bash
if [[ "$MODE" == "shell" ]]; then
"$@"
else
proxmox-backup-client "$@" proxmox-backup-client "$@"
fi