x86架构linux 利用pyinstaller和staticx 静态编译py程序
docker run --rm -v "$(pwd)/myapp:/usr/src/app" my-python-packager /bin/sh -c "/opt/venv/bin/pip install -r requirements.txt && /opt/venv/bin/pyinstaller --onefile app.py && /opt/venv/bin/staticx dist/app dist/app_static && chmod 755 dist/app_static"
最终dist/app_static就是静态编译文件
Content type
Image
Digest
sha256:a08171f61…
Size
114.7 MB
Last updated
almost 2 years ago
docker pull dukun/my-python-packager