choco docker

sdarwin's Avatar

sdarwin

11 Nov, 2020 07:54 PM

Hi,

Trying out some things with self-hosted appveyor and BYOC. Launched a windows 2019 server in AWS.

On this page https://www.appveyor.com/docs/server/#docker-1 it recommends using FROM appveyor/build-image:minimal-windowsservercore-ltsc2019 and choco to install packages. That makes sense.

Create Dockerfile with the following contents:

FROM appveyor/build-image:minimal-windowsservercore-ltsc2019
RUN choco install -y python
It returns an error.

Do you get a similar result?

You could also try it by creating the above-mentioned Dockerfile and then running "docker build . " Any feedback is appreciated.

 docker build .
Sending build context to Docker daemon  6.656kB
Step 1/3 : FROM appveyor/build-image:minimal-windowsservercore-ltsc2019
 ---> 51e0dccf0a6d
Step 2/3 : RUN choco install -y python
 ---> Running in f568521fff2d
Chocolatey v0.10.15
Installing the following packages:
python
By installing you accept licenses for the packages.
Progress: Downloading python3 3.9.0... 100%
Progress: Downloading vcredist2015 14.0.24215.20170201... 100%
Progress: Downloading vcredist140 14.27.29112... 100%
Progress: Downloading KB3033929 1.0.5... 100%
Progress: Downloading KB3035131 1.0.3... 100%
Progress: Downloading python 3.9.0... 100%


KB3035131 v1.0.3 [Approved] kb3035131 package files install completed. Performing other installation steps. Skipping installation because update KB3035131 does not apply to this operating system (Microsoft Windows Server 2019 Datacenter). The install of kb3035131 was successful. Software install location not explicitly set, could be in package or default install location if installer.


KB3033929 v1.0.5 [Approved] kb3033929 package files install completed. Performing other installation steps. Skipping installation because update KB3033929 does not apply to this operating system (Microsoft Windows Server 2019 Datacenter). The install of kb3033929 was successful. Software install location not explicitly set, could be in package or default install location if installer.


vcredist140 v14.27.29112 [Approved] vcredist140 package files install completed. Performing other installation steps. Downloading vcredist140-x86 from 'https://download.visualstudio.microsoft.com/download/pr/48431a06-59c5-4b63-a102-20b66a521863/CAA38FD474164A38AB47AC1755C8CCCA5CCFACFA9A874F62609E6439924E87EC/VC_redist.x86.exe' Progress: 100% - Completed download of C:\Users\ContainerAdministrator\AppData\Local\Temp\chocolatey\vcredist140\14.27.29112\VC_redist.x86.exe (13.62 MB). Download of VC_redist.x86.exe (13.62 MB) completed. Hashes match. Installing vcredist140-x86... ERROR: Running ["C:\Users\ContainerAdministrator\AppData\Local\Temp\chocolatey\vcredist140\14.27.29112\VC_redist.x86.exe" /quiet /norestart ] was not successful. Exit code was '-1073741502'. See log for possible error messages. The install of vcredist140 was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\vcredist140\tools\chocolateyInstall.ps1'. See log for details.


vcredist2015 v14.0.24215.20170201 [Approved] vcredist2015 package files install completed. Performing other installation steps. The install of vcredist2015 was successful. Software install location not explicitly set, could be in package or default install location if installer.


python3 v3.9.0 [Approved] python3 package files install completed. Performing other installation steps. Installing 64-bit python3... ERROR: Running ["C:\ProgramData\chocolatey\lib\python3\tools\python-3.9.0-amd64.exe" /quiet InstallAllUsers=1 PrependPath=1 TargetDir="C:\Python39" ] was not successful. Exit code was '-1073741502'. See log for possible error messages. The install of python3 was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1'. See log for details.


python v3.9.0 [Approved] python package files install completed. Performing other installation steps. The install of python was successful. Software install location not explicitly set, could be in package or default install location if installer.


Chocolatey installed 4/6 packages. 2 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).


Installed: - python v3.9.0 - kb3033929 v1.0.5 - vcredist2015 v14.0.24215.20170201 - kb3035131 v1.0.3


Failures - python3 (exited -1073741502) - Error while running 'C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1'. See log for details. - vcredist140 (exited -1073741502) - Error while running 'C:\ProgramData\chocolatey\lib\vcredist140\tools\chocolateyInstall.ps1'. See log for details.


Enjoy using Chocolatey? Explore more amazing features to take your experience to the next level at https://chocolatey.org/compare The command 'cmd /S /C choco install -y python' returned a non-zero code: 3221225794
  1. Support Staff 1 Posted by Feodor Fitsner on 13 Nov, 2020 12:38 AM

    Feodor Fitsner's Avatar

    Sorry for the late reply. You may try installing python without dependencies:

    choco install -y python --ignore-dependencies
    
  2. 2 Posted by sdarwin on 13 Nov, 2020 02:13 PM

    sdarwin's Avatar

    Yes, that allowed the installation to complete.
    Thank you.
    I wonder if skipping dependencies has any implications later on.
    Another method which doesn't require --ignore-dependencies is to build the image entirely from scratch using the original Dockerfile.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac