amitie10g/msys2

By amitie10g

Updated 1 day ago

MSYS2 under Windows Server Core

Image

2.2K

MSYS2 container image

This is an attemp to bring the latest MSYS2 base (initial setup included) Microsoft® Windows® Server Core Docker image, intended to be used in my own projects.

Repo | Dockerfile

Currently, only Server Core is supported, as MSYS executables are unable to run under Nano Server.

Usage

MSYS (default) interactive shell

docker run -it --volume=host-src:container-dest --workdir="container-dest" amitie10g/msys2

MinGW64 interactive shell

docker run -e MSYSTEM=MINGW64 --volume=host-src:container-dest --workdir="container-dest" amitie10g/msys2

MinGW32 interactive shell

docker run -e MSYSTEM=MINGW32 --volume=host-src:container-dest --workdir="container-dest" amitie10g/msys2

CMD interactive shell

docker run --volume=host-src:container-dest --workdir="container-dest" amitie10g/msys2 cmd

Powershell interactive shell

docker run --volume=host-src:container-dest --workdir="container-dest" amitie10g/msys2 powershell

You may use the shell of your preference by issuing your alternative CMD. For instance, Bash (bash) is the default CMD and shell; you may choose the Windows CMD (cmd) or Powershell (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 WINDOWS_VERSION=latest
FROM amitie10g/msys2:$WINDOWS_VERSION

<your code>

Command line

docker build --build-arg WINDOWS_VERSION=20H2 -t <your tag> .

Licensing

  • The Dockerfile has been released into the public domain (the Unlicense)

  • The Windows container base image usage is subjected to the Microsoft EULA.

Docker Pull Command

docker pull amitie10g/msys2