Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/cmd/grafana-agentctl/Dockerfile.windows
4093 views
FROM grafana/agent-build-image:0.25.0-windows as builder
ARG VERSION
ARG RELEASE_BUILD=1

COPY . /src/agent
WORKDIR /src/agent

SHELL ["cmd", "/S", "/C"]

# Creating new layers can be really slow on Windows so we clean up any caches
# we can before moving on to the next step.
RUN ""C:\Program Files\git\bin\bash.exe" -c "RELEASE_BUILD=${RELEASE_BUILD} VERSION=${VERSION} make agentctl && go clean -cache -modcache""

# Use the smallest container possible for the final image
FROM mcr.microsoft.com/windows/nanoserver:1809

COPY --from=builder /src/agent/build/grafana-agentctl /bin/grafana-agentctl

ENTRYPOINT ["/bin/grafana-agentctl"]