From c6dfaaea8e042cccfb42928db55112c6c8b27691 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Fri, 10 Oct 2025 21:24:14 +0800 Subject: [PATCH] dockerfile (#5750) * dockerfile * dockerfile * dockerfile --- projects/sandbox/Dockerfile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/projects/sandbox/Dockerfile b/projects/sandbox/Dockerfile index 94ad7ccc2..8915505fc 100644 --- a/projects/sandbox/Dockerfile +++ b/projects/sandbox/Dockerfile @@ -1,21 +1,27 @@ # --------- install dependence ----------- FROM python:3.11-alpine AS python_base -ENV VERSION_RELEASE=Alpine3.11 -# 安装make和g++ -RUN apk add --no-cache make g++ tar wget gperf automake libtool linux-headers +# 安装make和g++以及libseccomp开发包 +RUN apk add --no-cache make g++ tar wget gperf automake libtool linux-headers libseccomp-dev WORKDIR /app COPY projects/sandbox/requirements.txt /app/requirements.txt + +# 先安装Cython和其他Python依赖 +RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple Cython && \ + pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple -r /app/requirements.txt + +# 下载、编译并安装libseccomp及其Python绑定 +ENV VERSION_RELEASE=2.5.5 RUN wget https://github.com/seccomp/libseccomp/releases/download/v2.5.5/libseccomp-2.5.5.tar.gz && \ tar -zxvf libseccomp-2.5.5.tar.gz && \ cd libseccomp-2.5.5 && \ ./configure --prefix=/usr && \ make && \ make install && \ - pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple Cython && \ - pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple -r /app/requirements.txt && \ - cd /app/libseccomp-2.5.5/src/python && \ - python setup.py install + cd src/python && \ + python setup.py install && \ + cd /app && \ + rm -rf libseccomp-2.5.5 libseccomp-2.5.5.tar.gz FROM node:20.14.0-alpine AS install