From eb1afc21920d72dd686d8797264ba36bcd1c647b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oleksis=20Fraga=20Men=C3=A9ndez?= Date: Mon, 20 Nov 2023 18:57:45 -0500 Subject: [PATCH 1/3] The container output will "Hello World!" --- windows-container-samples/python/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows-container-samples/python/README.md b/windows-container-samples/python/README.md index 33a406ec2..f92fb4340 100644 --- a/windows-container-samples/python/README.md +++ b/windows-container-samples/python/README.md @@ -34,7 +34,7 @@ All container sample source code is kept under the Vitualization-Documentation g docker build -t python:latest . 5. To run the newly built container, run the docker run command. docker run -it python -6. This will enter you into the container and show you "Hello World." +6. This will enter you into the container and show you "Hello World!" 7. The python version should display. Use the exit command to exit the container. ## Dockerfile Details: ``` From 937cbaaa097b69d1a6b563e52f2b77c6c1c8addb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oleksis=20Fraga=20Men=C3=A9ndez?= Date: Mon, 20 Nov 2023 21:03:58 -0500 Subject: [PATCH 2/3] Run the frozen `__hello__` module --- windows-container-samples/python/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/windows-container-samples/python/Dockerfile b/windows-container-samples/python/Dockerfile index a0124d397..ecb814d8b 100644 --- a/windows-container-samples/python/Dockerfile +++ b/windows-container-samples/python/Dockerfile @@ -12,6 +12,4 @@ RUN powershell.exe -Command \ Start-Process c:\python-3.10.0.exe -ArgumentList '/quiet InstallAllUsers=1 PrependPath=1' -Wait ; \ Remove-Item c:\python-3.10.0.exe -Force -RUN echo print("Hello World!") > c:\hello.py - -CMD ["py", "c:/hello.py"] +CMD ["py", "-m" ,"__hello__"] From 8871058f9c50bcd89ee19aefb80c9281ffc5b630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oleksis=20Fraga=20Men=C3=A9ndez?= Date: Mon, 20 Nov 2023 21:06:57 -0500 Subject: [PATCH 3/3] Update the Instructions steps 6 and 7 Update Dockerfile Details --- windows-container-samples/python/README.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/windows-container-samples/python/README.md b/windows-container-samples/python/README.md index f92fb4340..25565f071 100644 --- a/windows-container-samples/python/README.md +++ b/windows-container-samples/python/README.md @@ -34,8 +34,8 @@ All container sample source code is kept under the Vitualization-Documentation g docker build -t python:latest . 5. To run the newly built container, run the docker run command. docker run -it python -6. This will enter you into the container and show you "Hello World!" -7. The python version should display. Use the exit command to exit the container. +6. This will enter you into the container and show you "Hello world!" +7. The container exits successfully. ## Dockerfile Details: ``` # This dockerfile utilizes components licensed by their respective owners/authors. @@ -52,8 +52,5 @@ RUN powershell.exe -Command \ Start-Process c:\python-3.10.0.exe -ArgumentList '/quiet InstallAllUsers=1 PrependPath=1' -Wait ; \ Remove-Item c:\python-3.10.0.exe -Force - -RUN echo print("Hello World!") > c:\hello.py - -CMD ["py", "c:/hello.py"] +CMD ["py", "-m" ,"__hello__"] ```