Skip to content

Commit

Permalink
Migrated windows-dev image from ActivePerl to Strawberry Perl due to …
Browse files Browse the repository at this point in the history
…ActivePerl installation policy.
  • Loading branch information
mabrarov committed Aug 18, 2022
1 parent 7721575 commit 0a01fdb
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion docker/msvc-2017/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $ErrorActionPreference = "Stop"
$project_dir = (Get-Item "${PSScriptRoot}").Parent.FullName
$image_repository = "${env:DOCKER_USER}/$(Split-Path "${project_dir}" -Leaf)"
#TODO: find way to deal with tags and versions
$image_version = "2.14.0"
$image_version = "2.15.0"
$image_revision = "$(git -C "${project_dir}" rev-parse --verify HEAD)"

Write-Host "Building ${image_repository}:${image_version} image with ${image_revision} revision"
Expand Down
2 changes: 1 addition & 1 deletion docker/msvc-2017/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Distributed under the MIT License (see accompanying LICENSE)
#

FROM abrarov/windows-dev:2.14.0
FROM abrarov/windows-dev:2.15.0

ENV MSVS_VERSION="15" \
MSVS_URL="https://aka.ms/vs" \
Expand Down
2 changes: 1 addition & 1 deletion docker/msvc-2019/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $ErrorActionPreference = "Stop"
$project_dir = (Get-Item "${PSScriptRoot}").Parent.FullName
$image_repository = "${env:DOCKER_USER}/$(Split-Path "${project_dir}" -Leaf)"
#TODO: find way to deal with tags and versions
$image_version = "2.14.0"
$image_version = "2.15.0"
$image_revision = "$(git -C "${project_dir}" rev-parse --verify HEAD)"

Write-Host "Building ${image_repository}:${image_version} image with ${image_revision} revision"
Expand Down
2 changes: 1 addition & 1 deletion docker/msvc-2019/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Distributed under the MIT License (see accompanying LICENSE)
#

FROM abrarov/windows-dev:2.14.0
FROM abrarov/windows-dev:2.15.0

ENV MSVS_VERSION="16" \
MSVS_URL="https://aka.ms/vs" \
Expand Down
2 changes: 1 addition & 1 deletion docker/msvc-2022/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $ErrorActionPreference = "Stop"
$project_dir = (Get-Item "${PSScriptRoot}").Parent.FullName
$image_repository = "${env:DOCKER_USER}/$(Split-Path "${project_dir}" -Leaf)"
#TODO: find way to deal with tags and versions
$image_version = "2.14.0"
$image_version = "2.15.0"
$image_revision = "$(git -C "${project_dir}" rev-parse --verify HEAD)"

Write-Host "Building ${image_repository}:${image_version} image with ${image_revision} revision"
Expand Down
2 changes: 1 addition & 1 deletion docker/msvc-2022/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Distributed under the MIT License (see accompanying LICENSE)
#

FROM abrarov/windows-dev:2.14.0
FROM abrarov/windows-dev:2.15.0

ENV MSVS_VERSION="17" \
MSVS_URL="https://aka.ms/vs" \
Expand Down
2 changes: 1 addition & 1 deletion docker/openssl-msvc-2017/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $ErrorActionPreference = "Stop"
$project_dir = (Get-Item "${PSScriptRoot}").Parent.FullName
$image_repository = "${env:DOCKER_USER}/$(Split-Path "${project_dir}" -Leaf)"
#TODO: find way to deal with tags and versions
$image_version = "2.14.0"
$image_version = "2.15.0"
$image_revision = "$(git -C "${project_dir}" rev-parse --verify HEAD)"

Write-Host "Building ${image_repository}:${image_version} image with ${image_revision} revision"
Expand Down
2 changes: 1 addition & 1 deletion docker/openssl-msvc-2017/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Distributed under the MIT License (see accompanying LICENSE)
#

FROM abrarov/msvc-2017:2.14.0
FROM abrarov/msvc-2017:2.15.0

ENV OPENSSL_VERSION="1.0.2q" \
OPENSSL_URL="https://www.openssl.org/source" \
Expand Down
2 changes: 1 addition & 1 deletion docker/openssl-msvc-2017/src/app/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rem

set exit_code=0

set "PATH=%ACTIVE_PERL_HOME%\bin;%PATH%"
set "PATH=%STRAWBERRY_PERL_HOME%\perl\bin;%PATH%"

call "%MSVC_BUILD_DIR%\%MSVC_CMD_BOOTSTRAP%"
set exit_code=%errorlevel%
Expand Down
2 changes: 1 addition & 1 deletion docker/openssl-msvc-2017/src/app/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ foreach ($address_model in ${address_models}) {
Write-Host "MSVS_INSTALL_DIR : ${env:MSVS_INSTALL_DIR}"
Write-Host "MSVC_BUILD_DIR : ${env:MSVC_BUILD_DIR}"
Write-Host "MSVC_CMD_BOOTSTRAP : ${env:MSVC_CMD_BOOTSTRAP}"
Write-Host "ACTIVE_PERL_HOME : ${env:ACTIVE_PERL_HOME}"
Write-Host "STRAWBERRY_PERL_HOME : ${env:STRAWBERRY_PERL_HOME}"
Write-Host "MSYS_HOME : ${env:MSYS_HOME}"
Write-Host "OPENSSL_HOME : ${env:OPENSSL_HOME}"
Write-Host "OPENSSL_INSTALL_DIR : ${env:OPENSSL_INSTALL_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion docker/openssl-msvc-2019/scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $ErrorActionPreference = "Stop"
$project_dir = (Get-Item "${PSScriptRoot}").Parent.FullName
$image_repository = "${env:DOCKER_USER}/$(Split-Path "${project_dir}" -Leaf)"
#TODO: find way to deal with tags and versions
$image_version = "2.14.0"
$image_version = "2.15.0"
$image_revision = "$(git -C "${project_dir}" rev-parse --verify HEAD)"

Write-Host "Building ${image_repository}:${image_version} image with ${image_revision} revision"
Expand Down
2 changes: 1 addition & 1 deletion docker/openssl-msvc-2019/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Distributed under the MIT License (see accompanying LICENSE)
#

FROM abrarov/msvc-2019:2.14.0
FROM abrarov/msvc-2019:2.15.0

ENV OPENSSL_VERSION="1.0.2q" \
OPENSSL_URL="https://www.openssl.org/source" \
Expand Down
2 changes: 1 addition & 1 deletion docker/openssl-msvc-2019/src/app/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rem

set exit_code=0

set "PATH=%ACTIVE_PERL_HOME%\bin;%PATH%"
set "PATH=%STRAWBERRY_PERL_HOME%\perl\bin;%PATH%"

call "%MSVC_BUILD_DIR%\%MSVC_CMD_BOOTSTRAP%"
set exit_code=%errorlevel%
Expand Down
2 changes: 1 addition & 1 deletion docker/openssl-msvc-2019/src/app/start.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ foreach ($address_model in ${address_models}) {
Write-Host "MSVS_INSTALL_DIR : ${env:MSVS_INSTALL_DIR}"
Write-Host "MSVC_BUILD_DIR : ${env:MSVC_BUILD_DIR}"
Write-Host "MSVC_CMD_BOOTSTRAP : ${env:MSVC_CMD_BOOTSTRAP}"
Write-Host "ACTIVE_PERL_HOME : ${env:ACTIVE_PERL_HOME}"
Write-Host "STRAWBERRY_PERL_HOME : ${env:STRAWBERRY_PERL_HOME}"
Write-Host "MSYS_HOME : ${env:MSYS_HOME}"
Write-Host "OPENSSL_HOME : ${env:OPENSSL_HOME}"
Write-Host "OPENSSL_INSTALL_DIR : ${env:OPENSSL_INSTALL_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion docker/windows-dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Contains:
1. [Git](https://git-scm.com)
1. [CMake](https://cmake.org)
1. [MSYS2](http://www.msys2.org) with base-devel Pacman package group
1. [ActivePerl](https://www.activestate.com/products/activeperl)
1. [Strawberry Perl](https://www.activestate.com/products/activeperl)
1. [Python 2.x and 3.x](https://www.python.org)

## Building
Expand Down
6 changes: 3 additions & 3 deletions docker/windows-dev/scripts/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ if (${LastExitCode} -ne 0) {
throw "Failed to get version of MSYS2 GNU patch"
}

Write-Host "Running ActivePerl in container created from ${image_repository}:latest image"
docker run --rm "${image_repository}:latest" "C:\Perl\bin\perl.exe" --version
Write-Host "Running Strawberry Perl in container created from ${image_repository}:latest image"
docker run --rm "${image_repository}:latest" "C:\Perl\perl\bin\perl.exe" --version
if (${LastExitCode} -ne 0) {
throw "Failed to get version of ActivePerl"
throw "Failed to get version of Strawberry Perl"
}

Write-Host "Running Python 2 in container created from ${image_repository}:latest image"
Expand Down
6 changes: 3 additions & 3 deletions docker/windows-dev/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ ENV DOWNLOAD_DIR="C:\download" \
MSYS2_TARGET="x86_64" \
MSYS2_VERSION="20220603" \
MSYS_HOME="C:\msys64" \
ACTIVE_PERL_VERSION="5.28" \
ACTIVE_PERL_URL="https://cli-msi.s3.amazonaws.com" \
ACTIVE_PERL_HOME="C:\Perl" \
STRAWBERRY_PERL_VERSION="5.32.1.1" \
STRAWBERRY_PERL_URL="https://strawberryperl.com/download" \
STRAWBERRY_PERL_HOME="C:\Perl" \
PYTHON_URL="https://www.python.org/ftp/python" \
PYTHON3_VERSION="3.10.6" \
PYTHON3_HOME="C:\Python3" \
Expand Down
22 changes: 11 additions & 11 deletions docker/windows-dev/src/app/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@ Write-Host "Extracting MSYS2 from ${msys_dist} into ${env:MSYS_HOME}"
& "${PSScriptRoot}\msys2.bat"
Write-Host "MSYS2 ${env:MSYS2_VERSION} installed into ${env:MSYS_HOME}"

# Download and install ActivePerl
$active_perl_dist_name = "ActivePerl-${env:ACTIVE_PERL_VERSION}.msi"
$active_perl_url = "${env:ACTIVE_PERL_URL}/${active_perl_dist_name}"
$active_perl_dist = "${env:TMP}\${active_perl_dist_name}"
Write-Host "Downloading ActivePerl from ${active_perl_url} into ${active_perl_dist}"
(New-Object System.Net.WebClient).DownloadFile("${active_perl_url}", "${active_perl_dist}")
Write-Host "Installing ActivePerl from ${active_perl_dist} into ${env:ACTIVE_PERL_HOME}"
$p = Start-Process -FilePath "${active_perl_dist}" `
-ArgumentList ("/norestart", "/quiet", "/qn", "INSTALLDIR=""${env:ACTIVE_PERL_HOME}\""") `
# Download and install Strawberry Perl
$strawberry_perl_dist_name = "strawberry-perl-${env:STRAWBERRY_PERL_VERSION}-64bit.msi"
$strawberry_perl_url = "${env:STRAWBERRY_PERL_URL}/${env:STRAWBERRY_PERL_VERSION}/${strawberry_perl_dist_name}"
$strawberry_perl_dist = "${env:TMP}\${strawberry_perl_dist_name}"
Write-Host "Downloading Strawberry Perl from ${strawberry_perl_url} into ${strawberry_perl_dist}"
(New-Object System.Net.WebClient).DownloadFile("${strawberry_perl_url}", "${strawberry_perl_dist}")
Write-Host "Installing Strawberry Perl from ${strawberry_perl_dist} into ${env:STRAWBERRY_PERL_HOME}"
$p = Start-Process -FilePath "${strawberry_perl_dist}" `
-ArgumentList ("/norestart", "/quiet", "/qn", "INSTALLDIR=""${env:STRAWBERRY_PERL_HOME}\""") `
-Wait -PassThru
if (${p}.ExitCode -ne 0) {
throw "Failed to install ActivePerl"
throw "Failed to install Strawberry Perl"
}
Write-Host "ActivePerl ${env:ACTIVE_PERL_VERSION} installed into ${env:ACTIVE_PERL_HOME}"
Write-Host "Strawberry Perl ${env:STRAWBERRY_PERL_VERSION} installed into ${env:STRAWBERRY_PERL_HOME}"

# Download and install Python 2.x
$python_dist_name = "python-${env:PYTHON2_VERSION}.amd64.msi"
Expand Down

0 comments on commit 0a01fdb

Please sign in to comment.