I am currently working on a project that requires the usage of the Spire.Doc, Spire.XLS & Spire.PDF (Spire.Office) library (python based) in a docker container based on Alpine 18 linux distribution. I have encountered some difficulties while attempting to integrate the library into docker and would greatly appreciate your assistance.
The specifications of my environment are as follows:
Docker Container's Operating System : Alpine 18
Python Version : 3.11.9
I attempted to install the library Spire.Office for python and other individual python packages too, but I encountered issues and was unable to succeed. Following is the docker command which is being used to create a docker image based on alpine.
- Code: Select all
FROM node:18-alpine
RUN apk add --update --no-cache g++ && ln -sf g++ /usr/bin/c++
RUN apk add --update --no-cache python3-dev
RUN apk add py3-pip
RUN apk add --update --no-cache unixodbc-dev
ENV NODE_ENV production
CMD ["sleep", "3600"]
When I tried to install the packages getting following error :
ERROR: Could not find a version that satisfies the requirement Spire.Office==9.1.0 (from versions: 1.0.0)
ERROR: No matching distribution found for Spire.Office==9.1.0
ERROR: Could not find a version that satisfies the requirement Spire.Doc==12.4.0 (from versions: none)
ERROR: No matching distribution found for Spire.Doc==12.4.0
ERROR: Could not find a version that satisfies the requirement Spire.Xls==14.4.4 (from versions: none)
ERROR: No matching distribution found for Spire.Xls==14.4.4
ERROR: Could not find a version that satisfies the requirement Spire.Pdf==10.5.2 (from versions: none)
ERROR: No matching distribution found for Spire.Pdf==10.5.2
Command used for installing these packages are as follows :
- Code: Select all
pip3 install --no-cache --upgrade Spire.Office==9.1.0 --break-system-packages
pip3 install --no-cache --upgrade Spire.Doc==12.4.0 --break-system-packages
pip3 install --no-cache --upgrade Spire.Xls==14.4.4 --break-system-packages
pip3 install --no-cache --upgrade Spire.Pdf==10.5.2 --break-system-packages
I would greatly appreciate any guidance or instructions you can provide to help me successfully integrate the Spire.Office library into my the docker environment based on Alpine.
Thank you very much for your attention and assistance. I look forward to your prompt response.
Also please note when I tried the same setup in the windows based machine it is working properly.
Sincerely,
Petchimuthu