Downloading applications in Windows Docker images

Hello everyone!

Has anyone worked with Windows Docker images? I’ve noticed they don’t come with a package manager or even msiexec. How do you usually install necessary applications? Do you just COPY files and folders?

I’m stuck with this problem because I need to install .msi file, but there is no msi installer and no way to install it.

Yes, Windows Docker images often come stripped down to reduce size, lacking tools like msiexec. To install .msi files, you can follow these steps:

Use a Base Image with msiexec**: Switch to a fuller base image, like mcr.microsoft.com/windows/servercore, which includes msiexec.
Install Manually:
Download the required .msi file in your Dockerfile using RUN curl or RUN powershell -Command.
Use msiexec to install it:

dockerfile
FROM Microsoft Artifact Registry
COPY your-installer.msi C:
RUN msiexec /i C:\your-installer.msi /quiet /norestart
Use a Custom Installer: If msiexec is missing, you may need to include it or install an alternative package manager like choco by bootstrapping it in your Dockerfile.

For minimal images, copying pre-installed binaries or dependencies is also a viable option if packaging tools aren’t necessary.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.