added shell entrypoint
This commit is contained in:
@@ -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}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
9
pbsclient/docker/scripts/entrypoint.sh
Normal file → Executable file
@@ -1,3 +1,10 @@
|
|||||||
#!bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ "$MODE" == "shell" ]]; then
|
||||||
|
"$@"
|
||||||
|
else
|
||||||
proxmox-backup-client "$@"
|
proxmox-backup-client "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user