Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🩹 Downgrade git from v2.47.1.windows.1 to v2.47.0.windows.2 #12

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docker/Dockerfile.server
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ LABEL org.opencontainers.image.source=https://github.com/s-weigand/uv-windows-do

RUN winget.exe install --id "Git.Git" --exact --source winget `
--accept-source-agreements --disable-interactivity --silent `
--accept-package-agreements --force
--accept-package-agreements --force `
--version 2.47.0.2

RUN git config --global init.defaultBranch main

RUN irm https://astral.sh/uv/$env:UV_VERSION/install.ps1 | iex
RUN $env:Path = 'C:\Users\ContainerAdministrator\.local\bin;' + $env:Path
RUN $env:Path = 'C:/Users/ContainerAdministrator/.local/bin;' + $env:Path

RUN uv python install $env:PYTHON_VERSIONS.split(' ')
23 changes: 20 additions & 3 deletions docker/Dockerfile.servercore
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,34 @@ RUN New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

RUN $vcRedistUrl='https://aka.ms/vs/17/release/vc_redist.x64.exe'; `
$installerPath='C:\vc_redist.x64.exe'; `
$installerPath='C:/vc_redist.x64.exe'; `
(New-Object System.Net.WebClient).DownloadFile($vcRedistUrl, $installerPath); `
Start-Process -FilePath $installerPath -ArgumentList '/install', '/quiet', '/norestart' -NoNewWindow -Wait; `
Remove-Item -Path $installerPath -Force

COPY --from=ghcr.io/s-weigand/mingit:ltsc2022 C:/git C:/git
RUN $downloadUrl='https://github.com/git-for-windows/git/releases/download/v2.47.0.windows.2/MinGit-2.47.0.2-64-bit.zip'; `
$artifactPath='C:/mingit.zip'; `
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, $artifactPath); `
Expand-Archive -Path $artifactPath -DestinationPath C:/git; `
Remove-Item -Path $artifactPath -Force

RUN $downloadUrl='https://github.com/git-lfs/git-lfs/releases/download/v3.6.0/git-lfs-windows-amd64-v3.6.0.zip'; `
$artifactPath='C:/git-lfs.zip'; `
$tmpExtractFolder='c:/tmp/git-lfs-3.6.0'; `
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, $artifactPath); `
Expand-Archive -Path $artifactPath -DestinationPath C:/tmp; `
Remove-Item -Path $artifactPath -Force; `
Copy-Item "$tmpExtractFolder/git-lfs.exe" 'c:/git/cmd/git-lfs.exe'; `
# Disable error about missing file, we can't view it in the container anyway due to the missing browser
New-Item 'C:/git/mingw64/share/doc/git-doc/git-lfs.html' -Force; `
Remove-Item -Path $tmpExtractFolder -Recurse -Force

RUN [Environment]::SetEnvironmentVariable('PATH', [Environment]::GetEnvironmentVariable('PATH') + ';C:/git/cmd;C:/git/mingw64/bin;C:/git/usr/bin', 'Machine')
RUN $env:Path = 'C:/git/cmd;C:/git/mingw64/bin;C:/git/usr/bin;' + $env:Path
RUN git config --global init.defaultBranch main
RUN git lfs install

RUN irm https://astral.sh/uv/$env:UV_VERSION/install.ps1 | iex
RUN $env:Path = 'C:\Users\ContainerAdministrator\.local\bin;' + $env:Path
RUN $env:Path = 'C:/Users/ContainerAdministrator/.local/bin;' + $env:Path

RUN uv python install $env:PYTHON_VERSIONS.split(' ')