dm/docker/build-dmpython/Dockerfile

25 lines
832 B
Docker
Raw Permalink Normal View History

2024-07-02 13:00:00 +08:00
#build-dmpython
2024-06-19 19:23:01 +08:00
FROM base-dm
WORKDIR /home/dmdba
COPY auto_install.xml .
2024-07-02 13:00:00 +08:00
RUN ./DMInstall.bin -q /home/dmdba/auto_install.xml \
&& rm -rf ./DMInstall.bin
USER root
RUN apt-get -y update \
&& apt-get install -y --no-install-recommends \
python3-dev python3-pip gcc \
&& apt-get clean \
&& rm -rf /config/* /tmp/* /var/lib/apt/lists/* /var/tmp/* \
&& pip3 install wheel
USER dmdba
2024-06-19 19:23:01 +08:00
# 编译
WORKDIR /home/dmdba/dmdbms/drivers/python/dmPython
2024-07-02 13:00:00 +08:00
RUN DM_HOME=/home/dmdba/dmdbms python3 setup.py bdist_wheel \
&& mkdir /home/dmdba/build_artifacts \
&& mv dist/dmPython-2.5.5-cp310-cp310-linux_x86_64.whl /home/dmdba/build_artifacts/ \
&& cp /home/dmdba/dmdbms/bin/libdmdpi.so /home/dmdba/build_artifacts/
USER root
RUN apt-get remove -y python3-dev python3-pip gcc
USER dmdba