windows_exporter
windows_exporter copied to clipboard
Switch to the official host process containers base image
See: https://github.com/microsoft/windows-host-process-containers-base-image#overview
To reduce the container size of windows_exporter, consider to use this image
mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0 instead the nanoserver once.
/cc. @jsturtevant
I'm happy to take a pull request for this change, but I have no way of testing the new image. Would someone be able to test this?
If you can provide the build image, I able to test it.
You'd have to build it yourself, see the Dockerfile in the project repository. You can change the image there and test both the image build process and running of the built image.
I didn't have any Windows environment with Docker. The AKS nodes are using containerd. Maybe its possible to build intermediate images through Github Actions
I didn't have any Windows environment with Docker
Same here :laughing:. I'll have a look at Github Actions for this, I may be able to build an intermediate image in my forked version of the repo sometime this week
You could use the Azure container registry to build the image.
az acr build --image sample/hello-world:v1
--registry myContainerRegistry008
--file Dockerfile .
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-quickstart-task-cli
You can also build windows container on linux, using cross os builds
ARG BASE=mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0
FROM --platform=$BUILDPLATFORM golang:1.21 as builder
ARG TARGETARCH
ARG TARGETOS
# Get dependencies
WORKDIR /w
COPY go.mod go.sum ./
RUN go mod download
RUN go install github.com/prometheus/promu@latest
# Build windows_exporter
COPY . ./
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make windows_exporter.exe
FROM $BASE
COPY --from=builder /w/windows_exporter.exe /windows_exporter.exe
ENTRYPOINT ["windows_exporter.exe"]
Then
docker buildx build -t a --platform=windows/amd64 .
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Unstale
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.