This is an attemp to bring several toolchains for MSYS2, under Microsoft® Windows® Server Core Docker image, intended to be used in my own projects.
The fillowing toolchains are provided, with the MSYSTEM
env properly configured.
gcc-x86_64
gcc
latest
provides GCC x86_64 (MINGW64)ucrt
provides GCC x86_64 (UCRT64)gcc-i686
provides GCC i686 (MINGW32)clang-x86_64
provides Clang x86_64 (CLANG64)clang-i686
provides Clang i686 (CLANG32)clang-aarch64
provides Clang arm64 (CLANGARM64)clang-x86_64-riscv64
provides Clang riscv64 (CLANG64)clang-i686-riscv64
provides Clang riscv64 (CLANG32)x86_64-riscv64
provides GCC riscv64 (MINGW64)ucrt-x86_64-riscv64
provides GCC riscv64 (UCRT64)i686-riscv64
provides GCC riscv64 (MINGW32)cross-gcc
cross
provides Cross GCC (MINGW32)cross-clang
provides Cross Clang (MINGW32)
Under Windows Server Core versions ltsc2022
and ltsc2019
MSYS Bash interactive shell (default)
docker run -it -v host-src:container-dest --workdir="container-dest" amitie10g/msys2-mingw-w64-toolchain
x86_64 toolchain using make install
docker run -e MSYSTEM=MINGW64 --volume=host-src:container-dest --workdir="container-dest" amitie10g/msys2-mingw-w64-toolchain make install
i686 toolchain using make install
docker run -e MSYSTEM=MINGW32 -e --volume=host-src:container-dest --workdir="container-dest" amitie10g/msys2-mingw-w64-toolchain make install
Windows CMD interactive shell
docker run -it --volume=host-src:container-dest --workdir="container-dest" amitie10g/msys2-mingw-w64-toolchain cmd
Windows Powershell interactive shell
docker run -it --volume=host-src:container-dest --workdir="container-dest" amitie10g/msys2-mingw-w64-toolchain powershell
If you want to use the MinGW32 environment, you must append C:\msys64\mingw32\bin
(under CMD shell) to the PATH environment at runtime, or set in an Entrypoint script.
The default workdir is C:\msys64
. Set another workdir is recommended only for runing non-interactive building process like make
.
ARG VERSION=latest
FROM amitie10g/msys2-mingw-w64-toolchain:$VERSION
<your code>
x86_64 toolchain
docker build --build-arg -t <your tag> .
i686 toolchain
docker build --build-arg VERSION=i686 -t <your tag> .
This image depends on the MSYS2 base image (Dockerfile), where the following packages are installed:
- autoconf
- automake
- bison
- diffutils
- flex
- gperf
- intltool
- libtool
- make
- texinfo
Due the Windows Server Core base image, this image is HUGE. I'm researching how to use Nano Server instead.
-
The Dockerfile has been released into the public domain (the Unlicense)
-
The MSYS2, MinGW-w64 and the packages included in the container are licensed under several licenses (including the GNU General Public License and other open source licenses). Please refer to them.
-
The Windows container base image usage is subjected to the Microsoft EULA.