Coder Social home page Coder Social logo

Comments (4)

snpefk avatar snpefk commented on June 1, 2024 1

Hi,

Thanks for your effort. I will check how building on ltsc2022 and with added flag works and report back.

from windows-containers.

ntrappe-msft avatar ntrappe-msft commented on June 1, 2024

Hi, @snpefk are you seeing a specific error?

from windows-containers.

fady-azmy-msft avatar fady-azmy-msft commented on June 1, 2024

Can you also confirm if you see this issue with Windows Server 2022? We currently do not fix OS issues for WS 2019 since we're past mainstream support (https://learn.microsoft.com/en-us/lifecycle/products/windows-server-2019).

from windows-containers.

ntrappe-msft avatar ntrappe-msft commented on June 1, 2024

Hi,

We no longer support Windows Server 2019 but LLVM 16 is compatible with Windows Server 2022. I simulated your Dockerfile with the more recent versions and it installed Visual Studio 2022 Build Tools successfully. Here's the updated Dockerfile:

# escape=`

FROM mcr.microsoft.com/windows/servercore:ltsc2022

# Workaround to build image
# See. https://stackoverflow.com/questions/76470752/chocolatey-installation-in-docker-started-to-fail-restart-due-to-net-framework
ENV chocolateyVersion=2.2.2

# Set the shell to PowerShell
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Install Chocolatey - a package manager for Windows
RUN Set-ExecutionPolicy Bypass -Scope Process -Force;  `
    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;  `
    iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'));

# Install build dependencies using Chocolatey
RUN choco install cmake --installargs 'ADD_CMAKE_TO_PATH=User' -y; `
    choco install ninja -y; `
    choco install git -y; `
    choco install python3 --version=3.12.0 -y; `
    # ⬇️ Add yes flag so agrees to installation automatically
    choco install visualstudio2022buildtools --allWorkloads --includeRecommended --includeOptional --passive -y; 

I started up the container and confirmed that Visual Studio 2022 Build Tools was installed by doing the following:

$> & 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe' -version

@snpefk Let me know if something wasn't installed in the container properly. Otherwise, I'll close this Issue for now as everything works with '22.

from windows-containers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.