# syntax=docker/dockerfile:1 FROM python:3.13-slim-bookworm AS builder ARG SCALABLE_CLI_VERSION=0.1.0 ARG TARGETARCH RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates \ && rm -rf /var/lib/apt/lists/* RUN ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "x86_64") \ && curl -fsSL -o /tmp/sc.tar.gz \ "https://github.com/ScalableCapital/scalable-cli/releases/download/v${SCALABLE_CLI_VERSION}/scalable-cli-${ARCH}-unknown-linux-gnu.tar.gz" \ && curl -fsSL -o /tmp/sc.tar.gz.sha256 \ "https://github.com/ScalableCapital/scalable-cli/releases/download/v${SCALABLE_CLI_VERSION}/scalable-cli-${ARCH}-unknown-linux-gnu.tar.gz.sha256" \ && cd /tmp && sha256sum -c sc.tar.gz.sha256 \ && tar -xzf sc.tar.gz \ && mv scalable-cli-${ARCH}-unknown-linux-gnu/sc /usr/local/bin/sc \ && chmod +x /usr/local/bin/sc FROM python:3.13-slim-bookworm ARG PUID=1000 ARG PGID=1000 # User mit konfigurierbarer UID/GID anlegen RUN groupadd -g ${PGID} appgroup \ && useradd -u ${PUID} -g appgroup -m -d /home/appuser appuser COPY --from=builder /usr/local/bin/sc /usr/local/bin/sc WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY scalable_sync.py . ENV SC_CONFIG_DIR=/tmp/sc-config USER ${PUID}:${PGID} ENTRYPOINT ["python", "/app/scalable_sync.py"]