# Troubleshooting Windows Server Core Container Build Issues with Python

**URL:** <https://forums.docker.com/t/troubleshooting-windows-server-core-container-build-issues-with-python/137611>\
**Category:** General\
**Tags:** dockerhub, docker, build, dockercloud, docker-desktop\
**Created:** [September 10, 2023, 8:24pm UTC](https://forums.docker.com/t/troubleshooting-windows-server-core-container-build-issues-with-python/137611 "2023-09-10T20:24:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![egeselcuk](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/egeselcuk/32/32567_2.png) [@egeselcuk](https://forums.docker.com/u/egeselcuk)\
**Post date:** [September 10, 2023, 8:24pm UTC](https://forums.docker.com/t/troubleshooting-windows-server-core-container-build-issues-with-python/137611/1 "2023-09-10T20:24:18Z")

</div>

I’m facing difficulties while trying to build Windows Server Core containers using Python images, specifically with the tag `python:3.9-windowsservercore`. I can successfully build containers using other Python tags, but I’m encountering issues with these Windows Server Core-based images.

Here’s my Dockerfile contents:

```plaintext
FROM python:3.9-windowsservercore

```

However, when I attempt to build the container, I encounter the following error:

```auto
=> ERROR [internal] load metadata for docker.io/library/python:3.9-windowsservercore
------
 > [internal] load metadata for docker.io/library/python:3.9-windowsservercore:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:d80b99d74aea127674d43c3e42d572bd2c718d6355680eeafdc1368ecb821daf: not found

```

I’ve confirmed that the image I’m trying to use is available on Docker Hub, and you can find it at the following link: [Python 3.9 on Windows Server Core](https://hub.docker.com/layers/library/python/3.9-windowsservercore/images/sha256-a5f77c43352fc785909f71e051e88fe271fe2f4607e1f2bcd0d030d3e489e217?context=explore).

I’ve also tried using a different Python version tag, such as `python:3.10-windowsservercore`, as an alternative, but I encountered a similar issue. I can successful use images of Linux distributions (like bullseye, bookworm, and alpine) and they all work fine. My host machine is running Windows 10 OS.

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [September 10, 2023, 9:07pm UTC](https://forums.docker.com/t/troubleshooting-windows-server-core-container-build-issues-with-python/137611/2 "2023-09-10T21:07:15Z")

</div>

Switch to Windows containers. Click on the whale icon in the notification area and choose “Switch to Windows containers”. Windows containers will not run in Linux containers mode.

---

<div class="post-metadata">

**Author:** ![egeselcuk](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/egeselcuk/32/32567_2.png) [@egeselcuk](https://forums.docker.com/u/egeselcuk)\
**Post date:** [September 10, 2023, 10:49pm UTC](https://forums.docker.com/t/troubleshooting-windows-server-core-container-build-issues-with-python/137611/3 "2023-09-10T22:49:45Z")

</div>

Thanks that works!  
However I see that the ARGs like `ARG POETRY_VERSION=1.6.1` cannot be recognized using windows server. So I have to use PowerShell on windows containers right ? Like running the following `RUN pip install "poetry==${POETRY_VERSION}"` ? gives the error: `Step 6/12 : RUN pip install "poetry==${POETRY_VERSION}" ---> Running in 609f34cd587d ERROR: Could not find a version that satisfies the requirement poetry== (from versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.4.0.post1, 0.4.1,...., 1.6.1) ERROR: No matching distribution found for poetry== `
