diff --git a/Dockerfile b/Dockerfile index ca47363..5a3c9f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,11 +30,23 @@ RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/etc/poetry python ENV PATH="${PATH}:/etc/poetry/bin" # Prince Download -RUN echo "Downloading Prince Package" \ +# RUN echo "Downloading Prince Package" \ +# && DEB_FILE=prince.deb \ +# && wget -O ${DEB_FILE} \ +# # https://www.princexml.com/download/prince_15.3-1_debian12_amd64.deb +# https://www.princexml.com/download/prince_15.4.1-1_debian12_amd64.deb +RUN echo "Downloading and Installing Prince Package based on architecture" \ && DEB_FILE=prince.deb \ - && wget -O ${DEB_FILE} \ - # https://www.princexml.com/download/prince_15.3-1_debian12_amd64.deb - https://www.princexml.com/download/prince_15.4.1-1_debian12_amd64.deb + && ARCH=$(dpkg --print-architecture) \ + && if [ "$ARCH" = "arm64" ]; then \ + PRINCE_URL="https://www.princexml.com/download/prince_20250207-1_debian12_arm64.deb"; \ + # https://www.princexml.com/download/prince_15.4.1-1_debian12_arm64.deb"; \ + else \ + PRINCE_URL="https://www.princexml.com/download/prince_20250207-1_debian12_amd64.deb"; \ + # https://www.princexml.com/download/prince_15.4.1-1_debian12_amd64.deb"; \ + fi \ + && echo "Detected architecture: $ARCH, downloading from $PRINCE_URL" \ + && wget -O ${DEB_FILE} $PRINCE_URL # Prince installer RUN apt-get update && apt-get install -y -o Acquire::Retries=4 --no-install-recommends \ @@ -45,7 +57,9 @@ RUN echo "Installing Prince stuff" \ && DEB_FILE=prince.deb \ && yes | gdebi ${DEB_FILE} \ && echo "Cleaning up" \ - && rm -f ${DEB_FILE} + && rm -f ${DEB_FILE} \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* # Set Prince location ENV PATH="${PATH}:/usr/lib/prince/bin"