fix & improve containerfile
This commit is contained in:
parent
d198229fe3
commit
3f2f150420
1 changed files with 6 additions and 3 deletions
|
|
@ -15,6 +15,8 @@ go mod download
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN --mount=type=bind,source=./libmxclient,target=/libmxclient/build <<EOF
|
RUN --mount=type=bind,source=./libmxclient,target=/libmxclient/build <<EOF
|
||||||
|
# building go lib
|
||||||
|
set -e
|
||||||
cd /libmxclient/build
|
cd /libmxclient/build
|
||||||
CGO_ENABLED=1 GOARCH=${GOARCH} go build -buildmode=c-shared -o /pygomx-build/libmxclient.so .
|
CGO_ENABLED=1 GOARCH=${GOARCH} go build -buildmode=c-shared -o /pygomx-build/libmxclient.so .
|
||||||
EOF
|
EOF
|
||||||
|
|
@ -23,9 +25,6 @@ FROM docker.io/library/python:${PYTHON_VERSION}-${DEBIAN_VERSION} AS pybuilder
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
ENV PIP_ROOT_USER_ACTION=ignore
|
ENV PIP_ROOT_USER_ACTION=ignore
|
||||||
|
|
||||||
RUN apt update
|
|
||||||
RUN apt -y install libolm-dev
|
|
||||||
|
|
||||||
COPY --from=gobuilder /pygomx-build/libmxclient.so /usr/local/lib/libmxclient.so
|
COPY --from=gobuilder /pygomx-build/libmxclient.so /usr/local/lib/libmxclient.so
|
||||||
COPY --from=gobuilder /pygomx-build/libmxclient.h /usr/local/include/libmxclient.h
|
COPY --from=gobuilder /pygomx-build/libmxclient.h /usr/local/include/libmxclient.h
|
||||||
|
|
||||||
|
|
@ -34,6 +33,8 @@ RUN pip install cffi setuptools
|
||||||
COPY pygomx-module /pygomx
|
COPY pygomx-module /pygomx
|
||||||
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
|
# build py module
|
||||||
|
set -e
|
||||||
cd /pygomx
|
cd /pygomx
|
||||||
python3 build_ffi.py
|
python3 build_ffi.py
|
||||||
ls -la *.so
|
ls -la *.so
|
||||||
|
|
@ -45,6 +46,8 @@ ENV PIP_ROOT_USER_ACTION=ignore
|
||||||
RUN pip install cffi
|
RUN pip install cffi
|
||||||
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
|
# install packages
|
||||||
|
set -e
|
||||||
apt update
|
apt update
|
||||||
apt -y upgrade
|
apt -y upgrade
|
||||||
apt -y install libolm3
|
apt -y install libolm3
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue