chef / chef/mixlib-install

Install.ps1 fails against servercore docker image

Open
#306 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Platform: Windows
Dominant language
Ruby
Stars
13
Forks
55
Avg merge
2d 15h
Merged PRs (30d)
8

Description

`FROM mcr.microsoft.com/windows/servercore

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

RUN . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install
`

Fails with

`Exception setting "OutputEncoding": "The request is not supported.
"
At line:2 char:1

  • [Console]::OutputEncoding = New-Object -typename System.Text.ASCIIEnc ...
  •   + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordE
     xception
      + FullyQualifiedErrorId : ExceptionWhenSetting`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the install.ps1 invocation in the mcr.microsoft.com/windows/servercore image, using the shown PowerShell shell settings. Trace where Console.OutputEncoding is set and verify that installation completes without the unsupported-request exception in that image.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, powershell
Domain
devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.