Skip to content

Commit

Permalink
retry curl
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed Aug 27, 2023
1 parent a07e756 commit 66805a7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docker/windows/x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ RUN setx path "C:\msys64\usr\bin;%PATH%"
# Install Visual C++ Build Tools 2019 and WinSDK
ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel

RUN curl -L https://nodejs.org/dist/v%NODE_VERSION%/node-v%NODE_VERSION%-x64.msi -o C:\TEMP\node-install.msi && `
RUN curl --retry 4 --connect-timeout 10 -L https://nodejs.org/dist/v%NODE_VERSION%/node-v%NODE_VERSION%-x64.msi -o C:\TEMP\node-install.msi && `
start /wait msiexec.exe /i C:\TEMP\node-install.msi /l*vx "%TEMP%\MSI-node-install.log" /qn ADDLOCAL=ALL && `
del C:\TEMP\node-install.msi && `
curl -L %CHANNEL_URL% -o C:\TEMP\VisualStudio.chman && `
curl -L https://aka.ms/vs/16/release/vs_buildtools.exe -o C:\TEMP\vs_buildtools.exe && `
curl --retry 4 --connect-timeout 10 -L %CHANNEL_URL% -o C:\TEMP\VisualStudio.chman && `
curl --retry 4 --connect-timeout 10 -L https://aka.ms/vs/16/release/vs_buildtools.exe -o C:\TEMP\vs_buildtools.exe && `
C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" `
--channelUri C:\TEMP\VisualStudio.chman `
--installChannelUri C:\TEMP\VisualStudio.chman `
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended && `
curl -L https://aka.ms/vs/16/release/vc_redist.x64.exe -o C:\TEMP\vc_redist.x64.exe && `
curl --retry 4 --connect-timeout 10 -L https://aka.ms/vs/16/release/vc_redist.x64.exe -o C:\TEMP\vc_redist.x64.exe && `
start /wait C:\TEMP\vc_redist.x64.exe /install /quiet /norestart && `
del C:\TEMP\vc_redist.x64.exe

Expand All @@ -60,7 +60,7 @@ FROM base as python
ARG PYTHON_VERSION

# Install Python
RUN curl -L https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%-amd64.exe -o C:\TEMP\python-installer.exe && `
RUN curl -L --retry 4 --connect-timeout 10 https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%-amd64.exe -o C:\TEMP\python-installer.exe && `
C:\TEMP\python-installer.exe -Wait /quiet InstallAllUsers=1 TargetDir=C:\Python PrependPath=1 Shortcuts=0 Include_doc=0 Include_test=0 && `
del C:\TEMP\python-installer.exe && `
C:\Python\python.exe -m pip install --upgrade pip && `
Expand All @@ -70,7 +70,7 @@ RUN curl -L https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VE
FROM base as opencv

# Install OpenCV
RUN curl -L https://github.com/opencv/opencv/releases/download/3.4.16/opencv-3.4.16-vc14_vc15.exe -o C:\TEMP\opencv-installer.exe && `
RUN curl -L --retry 4 --connect-timeout 10 https://github.com/opencv/opencv/releases/download/3.4.16/opencv-3.4.16-vc14_vc15.exe -o C:\TEMP\opencv-installer.exe && `
start /wait C:\TEMP\opencv-installer.exe -gm2 -y -oC:\ && `
del C:\TEMP\opencv-installer.exe

Expand All @@ -85,7 +85,7 @@ ENV OPENJDK_SHA256 087d096032efe273d7e754a25c85d8e8cf44738a3e597ad86f55e0971acc3
ENV JAVA_HOME C:\Java\jdk-11.0.13+8

# Install Java
RUN curl -L https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.zip -o C:\TEMP\%OPENJDK_ZIP% && `
RUN curl -L --retry 4 --connect-timeout 10 https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.zip -o C:\TEMP\%OPENJDK_ZIP% && `
for /F %s in ('sha256sum /c/TEMP/%OPENJDK_ZIP%') do ((test "%s" = "%OPENJDK_SHA256%" || (echo %s 'Checksum Failed' && exit 1))) && `
unzip C:\TEMP\%OPENJDK_ZIP% -d C:\Java && `
del C:\TEMP\%OPENJDK_ZIP%
Expand All @@ -94,7 +94,7 @@ ENV COMMANDLINETOOLS_ZIP commandlinetools.zip
ENV COMMANDLINETOOLS_SHA256 9b782a54d246ba5d207110fddd1a35a91087a8aaf4057e9df697b1cbc0ef60fc

# Install Android SDK and NDK
RUN curl -L https://dl.google.com/android/repository/commandlinetools-win-10406996_latest.zip -o C:\TEMP\%COMMANDLINETOOLS_ZIP% && `
RUN curl -L --retry 4 --connect-timeout 10 https://dl.google.com/android/repository/commandlinetools-win-10406996_latest.zip -o C:\TEMP\%COMMANDLINETOOLS_ZIP% && `
for /F %s in ('sha256sum /c/TEMP/%COMMANDLINETOOLS_ZIP%') do ((test "%s" = "%COMMANDLINETOOLS_SHA256%" || (echo 'Checksum Failed' && exit 1))) && `
unzip C:\TEMP\%COMMANDLINETOOLS_ZIP% -d C:\Android && `
del C:\TEMP\%COMMANDLINETOOLS_ZIP%
Expand All @@ -119,8 +119,8 @@ ENV PYTHON_BIN_PATH=${PYTHON_INSTALL_PATH}\python.exe
# Install Bazel and NuGet
RUN setx path "C:\bin;%PYTHON_INSTALL_PATH%;%PYTHON_INSTALL_PATH%\Scripts;%PATH%" && `
mkdir C:\bin && `
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-windows-amd64.exe -o C:\bin\bazel.exe && `
curl -L https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -o C:\bin\nuget.exe
curl -L --retry 4 --connect-timeout 10 https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-windows-amd64.exe -o C:\bin\bazel.exe && `
curl -L --retry 4 --connect-timeout 10 https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -o C:\bin\nuget.exe

COPY --from=python C:\Python C:\Python
COPY --from=opencv C:\opencv C:\opencv
Expand All @@ -131,7 +131,7 @@ ENV WS_LONG_PATHS_BASE ndk-wsls-${WS_LONG_PATHS_VERSION}
ENV WS_LONG_PATHS_7Z ${WS_LONG_PATHS_BASE}.7z

# Patch for Android NDK
RUN curl -L https://github.com/simdsoft/wsLongPaths/releases/download/v%WS_LONG_PATHS_VERSION%/%WS_LONG_PATHS_7Z% -o C:\TEMP\%WS_LONG_PATHS_7Z% && `
RUN curl -L --retry 4 --connect-timeout 10 https://github.com/simdsoft/wsLongPaths/releases/download/v%WS_LONG_PATHS_VERSION%/%WS_LONG_PATHS_7Z% -o C:\TEMP\%WS_LONG_PATHS_7Z% && `
bash.exe -c "7z x -o/c/TEMP /c/TEMP/${WS_LONG_PATHS_7Z}" && `
C:\TEMP\%WS_LONG_PATHS_BASE%\install.bat %ANDROID_NDK_HOME% %ANDROID_HOME%

Expand Down

0 comments on commit 66805a7

Please sign in to comment.