本镜像用于将 FIRERPA 扩展模块或是在内部环境中执行的脚本进行编译处理以减少逻辑泄漏的可能。通过 Cython 将核心 Python 脚本转换并编译为 so (shared library) 文件,支持多平台。您可以通过此镜像来将 FIRERPA 中放置在 /data/usr/module/(task|extension) 或是在内部 Python 环境中运行的脚本进行编译化加密。This image is designed for compiling FIRERPA extension modules or scripts executed in internal environments to reduce the possibility of logic leakage. It uses Cython to convert and compile core Python scripts into so (shared library) files, supporting multiple platforms. You can utilize this image to compile and encrypt scripts located in /data/usr/module/(task|extension) within FIRERPA, or those running in the internal Python environment.
docker build -t compiler .使用如下命令将源代码映射到镜像内并编译,支持的 arch 包括 arm、arm64、x86、x86_64,对应 FIRERPA 服务端的不同架构。Use the following command to map the source code into the image and compile it. The supported arch types are arm, arm64, x86, and x86_64, corresponding to the different architectures of server.
docker run -it --rm -v /source/dir:/data compiler:latest compile.sh --arch arm64 /data/my_script.py