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

build windows servercore image #58

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jamesfricker
Copy link

@jamesfricker jamesfricker commented Nov 30, 2024

@@ -162,4 +227,4 @@ jobs:
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
tag_name: ${{ needs.version.outputs.new-version }}
tag_name: ${{ needs.version.outputs.new-version }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tag_name: ${{ needs.version.outputs.new-version }}
tag_name: ${{ needs.version.outputs.new-version }}

RUN Invoke-WebRequest -Uri "https://github.com/prefix-dev/pixi/releases/download/v${env:PIXI_VERSION}/pixi-x86_64-pc-windows-msvc.exe" -OutFile C:\Windows\System32\pixi.exe

RUN pixi --version

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

RUN mkdir C:\Pixi

# Download Pixi
ADD https://github.com/prefix-dev/pixi/releases/download/v${PIXI_VERSION}/pixi-x86_64-pc-windows-msvc.exe C:\Pixi\pixi.exe
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while we're at it: there is also https://github.com/prefix-dev/pixi/releases/download/v0.39.0/pixi-aarch64-pc-windows-msvc.exe. wdyt of doing a multi-arch build on windows as well similar to linux?

shell: pwsh

- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0

ADD https://github.com/prefix-dev/pixi/releases/download/v${PIXI_VERSION}/pixi-x86_64-pc-windows-msvc.exe C:\Pixi\pixi.exe

# Set PATH environment variable
ENV PATH="C:\Pixi;${PATH}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ENV PATH="C:\Pixi;${PATH}"
ENV PATH="C:\Pixi;${PATH}"

@pavelzw pavelzw added the enhancement New feature or request label Dec 13, 2024
Comment on lines +1 to +12
# escape=`

ARG BASE_IMAGE
FROM ${BASE_IMAGE}

ARG PIXI_VERSION

# Create a directory for Pixi
RUN mkdir C:\Pixi

# Download Pixi
ADD https://github.com/prefix-dev/pixi/releases/download/v${PIXI_VERSION}/pixi-x86_64-pc-windows-msvc.exe C:\Pixi\pixi.exe

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always enable long paths as a matter of course. You might also be able to save a layer by using a heredoc:

Suggested change
# escape=`
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG PIXI_VERSION
# Create a directory for Pixi
RUN mkdir C:\Pixi
# Download Pixi
ADD https://github.com/prefix-dev/pixi/releases/download/v${PIXI_VERSION}/pixi-x86_64-pc-windows-msvc.exe C:\Pixi\pixi.exe
# syntax=docker/dockerfile:1
# escape=`
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG PIXI_VERSION
# Create a directory for Pixi
RUN <<EOF
mkdir C:\Pixi
curl.exe -fsSL "https://github.com/prefix-dev/pixi/releases/download/v${PIXI_VERSION}/pixi-x86_64-pc-windows-msvc.exe" -o C:\Pixi\pixi.exe
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1
EOF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows base image
3 participants