batonogov/pyinstaller-linux and batonogov/pyinstaller-windows are a pair of Docker containers to ease compiling Python applications to binaries / exe files.
Current PyInstaller version used:
- 5.3.0 for Python 3.10.6
batonogov/pyinstaller-linux
both have few tags :latest
, :dev
.
batonogov/pyinstaller-windows
both have few tags :latest
, :dev
.
The :latest
tag runs Python 3.10.6 x86-64.
There are two containers, one for Linux and one for Windows builds. The Windows builder runs Wine inside Ubuntu to emulate Windows in Docker.
To build your application, you need to mount your source code into the /src/
volume.
The source code directory should have your .spec
file that PyInstaller generates. If you don't have one, you'll need to run PyInstaller once locally to generate it.
If the src
folder has a requirements.txt
file, the packages will be installed into the environment before PyInstaller runs.
For example, in the folder that has your source code, .spec
file and requirements.txt
:
docker run -v "$(pwd):/src/" batonogov/pyinstaller-windows
will build your PyInstaller project into dist/
. The .exe
file will have the same name as your .spec
file.
docker run -v "$(pwd):/src/" batonogov/pyinstaller-linux
will build your PyInstaller project into dist/
. The binary will have the same name as your .spec
file.
You'll need to supply a custom command to Docker to install system pacakges. Something like:
docker run -v "$(pwd):/src/" --entrypoint /bin/sh batonogov/pyinstaller-linux -c "apt-get update -y && apt-get install -y wget && /entrypoint.sh"
Replace wget
with the dependencies / package(s) you need to install.
docker run -v "$(pwd):/src/" batonogov/pyinstaller-linux "pyinstaller your-script.py"
will generate a spec
file for your-script.py
in your current working directory. See the PyInstaller docs for more information.
Add pyinstaller=5.1.0
to your requirements.txt
.
Yes, by supplying the PYPI_URL
and PYPI_INDEX_URL
environment variables that point to your PyPi mirror.
None
2022
- Updated OpenSSL 1.1.1p -> 1.1.1q
- Updated Pyinstaler 5.2.0 -> 5.3.0
- Updated Python 3.10.5 -> 3.10.6
- Updated Python 3.10.4 -> 3.10.5
- Updated OpenSSL 1.1.1o -> 1.1.1p
- Updated Pyinstaler 5.1.0 -> 5.2.0
- Updated Pyinstaler 4.10 -> 5.1.0
- Updated OpenSSL 1.1.1n -> 1.1.1o
- Updated Ubuntu 20.04 -> 22.04 for amd64
- Updated Python 3.10.1 -> 3.10.4
- Updated Pyinstaler 4.7.0 -> 4.10
- Updated OpenSSL 1.1.1m -> 1.1.1n
2021
- Updated Python 3.10.0 -> 3.10.1
- Updated OpenSSL 1.1.1l -> 1.1.1m
- Updated Python 3.9.7 -> 3.10.0
- Updated Pyinstaler 4.5.1 -> 4.7.0
- Updated Ubuntu 12.04 -> 20.04 for amd64
- Updated openssl 1.0.2u -> 1.1.1l for amd64
- Deleted Python 2 Dockerfiles
- Deleted 32 bit Dockerfiles
- Updated Ubuntu 16.04 -> 20.04 for win64 and win32
- Updated PyInstaller 4.2 -> 4.5.1
- Updated Python 3.9.5 -> 3.9.7
- Drop support for Python 2.7
- Updated Python 3 to version 3.9
- Updated PyInstaller to version 4.2
2020
- Added a 32bit package, thank you @danielguardicore
- Updated PyInstaller to version 3.6
2019
- Build using an older version of glibc to improve compatibility, thank you @itouch5000
- Updated PyInstaller to version 3.4
2017
Added Python 3.6 on Windows, thanks to @jameshilliard
Changed the default PyInstaller version to 3.3
Fixed bug with concatenated commands in entrypoint arguments, thanks to @alph4
Upgraded PyInstaller to version 3.2.1. Thanks to @bmustiata for contributing:
- Custom PyPi URLs
- No longer need to supply a requirements.txt file if your project doesn't need it
- PyInstaller can be called directly, for e.g to generate a spec file
2016
Added Python 3.5 on Windows, thanks (again) to @bmustiata
Added Python 3.4 on Windows, thanks to @bmustiata
First release, works.
MIT