diff --git a/pbs-client/dev/compose.yml b/pbs-client/dev/compose.yml index f18c3c0..2b192f2 100644 --- a/pbs-client/dev/compose.yml +++ b/pbs-client/dev/compose.yml @@ -1,15 +1,22 @@ name: pbsclient-dev services: - app: + shell: build: - dockerfile: docker/Dockerfile - context: ../ - command: ${COMMAND} + dockerfile: Dockerfile + context: ../docker + entrypoint: bash -c + command: "echo hello && tail -f /dev/null" environment: - - APP_ENV=${APP_ENV} - PBS_PASSWORD=${PBS_PASSWORD} - PBS_REPOSITORY=${PBS_REPOSITORY} - PBS_FINGERPRINT=${PBS_FINGERPRINT} - - MODE=${MODE} - + cli: + build: + dockerfile: Dockerfile + context: ../docker + environment: + - PBS_PASSWORD=${PBS_PASSWORD} + - PBS_REPOSITORY=${PBS_REPOSITORY} + - PBS_FINGERPRINT=${PBS_FINGERPRINT} + command: "snapshot list" \ No newline at end of file diff --git a/pbs-client/docker/Dockerfile b/pbs-client/docker/Dockerfile index 2871a80..d2a9999 100644 --- a/pbs-client/docker/Dockerfile +++ b/pbs-client/docker/Dockerfile @@ -1,12 +1,18 @@ FROM debian:bookworm-slim -RUN apt-get update -RUN apt install -y wget + +RUN apt update && apt install -y \ +curl \ +wget \ +python3 \ +bash \ +python3-yaml + + RUN wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg RUN echo "deb http://download.proxmox.com/debian/pbs-client bookworm main" > /etc/apt/sources.list.d/pbs.list -RUN apt update -RUN apt install -y proxmox-backup-client -COPY ./scripts/entrypoint.sh /usr/local/bin/entrypoint.sh -RUN chmod +x /usr/local/bin/entrypoint.sh -ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] +RUN apt update && apt install -y proxmox-backup-client && \ +rm -rf /var/lib/apt/lists/* + +ENTRYPOINT [ "proxmox-backup-client" ] diff --git a/pbs-client/docker/scripts/entrypoint.sh b/pbs-client/docker/scripts/entrypoint.sh deleted file mode 100755 index 683a279..0000000 --- a/pbs-client/docker/scripts/entrypoint.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ "$MODE" == "shell" ]]; then - "$@" -else - proxmox-backup-client "$@" -fi - - -