How to Install packages from command line and Dockerfile with Chocolatey
Introduction We will introduce a Package Manager for Windows: . In automations…
March 03, 2021
Often in automation, we need to install stuff from command line, not from the UI. We will install Perl from command line, and with Dockerfile.
As we have seen in previous post on How to install packages from command line This post is motivated from that only.
Open powershell
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; \
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12'; \
iex ((New-Object System.Net.WebClient).DownloadString("https://chocolatey.org/install.ps1"));
Once chocolatey is installed, you need to fire just one command to install strawberry perl or activeperl.
choco install strawberryperl -y;
FROM microsoft/windowsservercore:ltsc2016
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV CHOCO_URL=https://chocolatey.org/install.ps1
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12'; `
iex ((New-Object System.Net.WebClient).DownloadString("$env:CHOCO_URL"));
RUN choco install strawberryperl -y;
Introduction We will introduce a Package Manager for Windows: . In automations…
Its essential to prepare a git branching strategy. This helps greatly in…
Introduction In this post, we will see how to theme form and its fields…
Introduction I had to create many repositories in an Github organization. I…
Introduction Consider a scenario where you are building a docker image on your…
Introduction This post is about hosting MongoDB replica set cluster with…
Introduction This post has the complete code to send email through smtp server…
Introduction In a normal email sending code from python, I’m getting following…
Introduction In one of my app, I was using to talk to . I have used some event…
Introduction So you have a Django project, and want to run it using docker image…
Introduction It is very important to introduce few process so that your code and…
Introduction In this post, we will see a sample Jenkin Pipeline Groovy script…