Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install or extract do not finish in docker, with mcr.microsoft.com/windows/servercore:2009-amd64 #58

Open
greenkalx opened this issue Dec 3, 2022 · 9 comments

Comments

@greenkalx
Copy link

greenkalx commented Dec 3, 2022

Both installer and tarball fail to fully install in docker.

The installer does extract partially, but is missing bash.exe and pacman.exe
For the installer, I am running:

Invoke-WebRequest https://github.com/msys2/msys2-installer/releases/download/2022-01-18/msys2-base-x86_64-20220118.sfx.exe -Outfile C:\tools\msys-setup.exe;
Start-Process "C:\tools\msys-setup.exe" -ArgumentList "-y -oC:\ " -Wait

The tarball extracts more, including bash.exe but is missing pacman.exe.
For the tarball, I am running:

Invoke-WebRequest http://repo.msys2.org/distrib/msys2-x86_64-latest.tar.xz -Outfile C:\tools\msys2.tar.xz
Start-process "7z" -ArgumentList "e C:\tools\msys2.tar.xz -oC:\tools " -NoNewWindow -Wait
Start-process "7z" -ArgumentList "x C:\tools\msys2.tar -oC:\ " -NoNewWindow -Wait

I have tried running docker 'build' and docker 'run':

docker build --memory 2GB --isolation process --build-arg BASE_TAG=$BASE_TAG --tag $TAG $COMPOSE_DIR

docker run -it --memory 2GB --isolation process docker-virtual.artifactory.york.lan/windows/servercore:2009-amd64 powershell

Wonder if it's due to permissions or antivirus (Carbon Black or Endpoint Protector).

I have tried other installers:

https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe
https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-x86_64-latest.exe

And other tarballs:

https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.tar.xz 

This was running for us with previous Windows versions, 1809-amd64 and 1909-amd64.

@greenkalx
Copy link
Author

These other installers are working in the same Docker container:
vs_buildtools.exe, winsdksetup.exe, 7z2107-x64.exe, PortableGit-2.27.0-64-bit.7z.exe, python-3.7.8-embed-amd64.zip, cmake-3.18.0-win64-x64.zip, nasm-2.15.03-win64.zip, v1.10.0/ninja-win.zip, strawberry-perl-5.28.2.1-64bit-portable.zip

I will post to MSYS2-packages as well, as I see more 'docker' traffic there.

@lazka
Copy link
Member

lazka commented Dec 3, 2022

This repo installs the sfx one every day in docker and tests it at least.

https://github.com/msys2/msys2-installer/actions/runs/3606759674

@lazka
Copy link
Member

lazka commented Dec 3, 2022

@greenkalx
Copy link
Author

greenkalx commented Dec 4, 2022

I tried with the flags from that Dockerfile,

$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'

But it still only partially installs, it's missing C:\msys64\usr\bin\bash.exe and pacman.exe etc.

PS C:\> Invoke-WebRequest https://github.com/msys2/msys2-installer/releases/download/2022-01-18/msys2-base-x86_64-20220118.sfx.exe -Outfile C:\msys2.exe;
PS C:\> $ErrorActionPreference = 'Stop'
PS C:\> $ProgressPreference = 'SilentlyContinue'

PS C:\> \msys2.exe -y -oC:\

7-Zip SFX 21.03 ZS v1.5.0 R2 (x64) : Copyright (c) 1999-2021 Igor Pavlov, 2016-2021 Tino Reichardt : 2021-10-05

Extracting archive: C:\msys2.exe
--
Path = C:\msys2.exe
Type = 7z

  5% 1946 - msys64\usr\lib\terminfo\61\adm22

@lazka
Copy link
Member

lazka commented Dec 5, 2022

Since the above works here and in CI and the extraction isn't really MSYS2 specific I'm out of ideas.

@greenkalx
Copy link
Author

I ran the setup without 'Start-Process' and got an exit code:

PS C:\> ./msys2.exe -y -oC:\
7-Zip SFX 21.03 ZS v1.5.0 R2 (x64) : Copyright (c) 1999-2021 Igor Pavlov, 2016-2021 Tino Reichardt : 2021-10-05
Extracting archive: C:\msys2.exe
--
Path = C:\msys2.exe
Type = 7z
  5% 1908 - msys64\usr\lib\terminfo\61\aaa-48-rv
PS C:\> $LastExitCode
-1073741819

@greenkalx
Copy link
Author

I think it's working now, by excluding '--isolation process' from the docker run.
Need to see my full process working..

@relapids

This comment was marked as off-topic.

@lazka

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants