Skip to content

amitie10g/docker-msys2-mingw-w64-toolchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MSYS2 MinGW-W64 toolchain Docker image under Windows

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.

Tags

The fillowing toolchains are provided, with the MSYSTEM env properly configured.

Under Windows Server Core versions ltsc2022 and ltsc2019

Usage

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.

Using this base image

Dockerfile

ARG VERSION=latest
FROM amitie10g/msys2-mingw-w64-toolchain:$VERSION

<your code>

Command line

x86_64 toolchain

docker build --build-arg -t <your tag> .

i686 toolchain

docker build --build-arg VERSION=i686 -t <your tag> .

Packages and dependencies

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

Caveats

Due the Windows Server Core base image, this image is HUGE. I'm researching how to use Nano Server instead.

Licensing

  • 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.