dm/docker/build-dmpython/Dockerfile

25 lines
832 B
Docker

#build-dmpython
FROM base-dm
WORKDIR /home/dmdba
COPY auto_install.xml .
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
# 编译
WORKDIR /home/dmdba/dmdbms/drivers/python/dmPython
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