none
Unable to install git and python packages inside Windows container RRS feed

  • Question

  • I am unable to install git and python packages inside Windows container.

    I am using choco to install these packages i.e. choco install git.

    On running the same command on container host, the package gets downloaded easily.

    What additional has to be done inside the container?

    Wednesday, December 16, 2015 7:31 AM

All replies

  • Whats the syntax you used? This has worked for me:

    RUN @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

    RUN choco install -fy nssm

    RUN choco install -fy etcd


    Wednesday, December 16, 2015 10:56 PM
  • Whats the syntax you used? This has worked for me:

    RUN @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

    RUN choco install -fy nssm

    RUN choco install -fy etcd


    This is not working for me

    Below is my dockerfile

    FROM windowsservercore
    RUN @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin 
    RUN choco install -fy git

    it gives error, 'choco' is not recognized as an internal or external command

    UPDATE

    following worked for me.

    FROM windowsservercore
    RUN @powershell iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))   
    RUN cinst -y git

    Tuesday, May 10, 2016 8:51 AM