Docker image to build, sign and package 32 and 64 bit Windows executables
1.8K
A Docker image to build, sign and package 32 and 64 bit Windows executables. Includes MingW, osslsigncode and WiX Toolset.
osslsigncode is used in preference to Mono signcode as Mono signcode cannot sign msi files, while osslsigncode can.
You can run the image interactively, or run individual commands or scripts by appending them to the run command.
Mount your working dir to /build in the Docker container. That is the default working dir.
docker run -v ~/build:/build karlvr/win-build ...
For more information on MingW see http://www.mingw.org
# 32 bit
WINDRES=i686-w64-mingw32-windres
CXX=i686-w64-mingw32-g++
# 64 bit
WINDRES=x86_64-w64-mingw32-windres
CXX=x86_64-w64-mingw32-g++
$WINDRES app.rc app-resources.o
$CXX -mwindows -o app.exe main.cpp
For more information on osslsigncode see https://stackoverflow.com/a/29073957/1951952 and https://sourceforge.net/p/osslsigncode/osslsigncode/ci/master/tree/
osslsigncode sign -pkcs12 Certificates.pfx -pass <password> -n <name> -i <time server> -in <in file> -out <out file>
For more information on WiX Toolset see http://wixtoolset.org/
We run WiX using wine, so it's not perfect. In particular, validating packages doesn't appear
to work, and fails with an odd error, so include the -sval flag to light.exe in order to disable validation.
WIXDIR=/opt/wix
HEAT="wine $WIXDIR/heat.exe"
CANDLE="wine $WIXDIR/candle.exe"
LIGHT="wine $WIXDIR/light.exe"
Then run the commands using the $HEAT, $CANDLE and $LIGHT environment variables.
Content type
Image
Digest
sha256:25b261e5a…
Size
181.9 MB
Last updated
6 months ago
docker pull karlvr/win-build