File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM stefanscherer/chocolatey AS tar
2+ RUN choco install -y 7zip
3+ ENV PROMETHEUS_VERSION 1.6.1
4+ RUN Invoke-WebRequest $('https://github.com/prometheus/prometheus/releases/download/v{0}/prometheus-{0}.windows-amd64.tar.gz' -f $env:PROMETHEUS_VERSION) -OutFile 'prometheus.tar.gz' -UseBasicParsing ; \
5+ & 'C:\P rogram Files\7 -Zip\7 z.exe' x prometheus.tar.gz ; \
6+ & 'C:\P rogram Files\7 -Zip\7 z.exe' x prometheus.tar ; \
7+ Rename-Item -Path $('C:\p rometheus-{0}.windows-amd64' -f $env:PROMETHEUS_VERSION) -NewName 'C:\d ownload'
8+
9+ FROM microsoft/nanoserver
10+
11+ COPY --from tar /download/prometheus.exe /bin/prometheus.exe
12+ COPY --from tar /download/promtool.exe /bin/promtool.exe
13+ COPY --from tar /download/prometheus.yml /etc/prometheus/prometheus.yml
14+ COPY --from tar /download/console_libraries/ /etc/prometheus/
15+ COPY --from tar /download/consoles/ /etc/prometheus/
16+
17+ EXPOSE 9090
18+ VOLUME [ "/prometheus" ]
19+ WORKDIR /prometheus
20+ ENTRYPOINT [ "C:\\ bin\\ prometheus.exe" ]
21+ CMD [ "-config.file=/etc/prometheus/prometheus.yml" , \
22+ "-storage.local.path=/prometheus" , \
23+ "-web.console.libraries=/etc/prometheus/console_libraries" , \
24+ "-web.console.templates=/etc/prometheus/consoles" ]
Original file line number Diff line number Diff line change 1+ . $PSScriptRoot \..\update-docker - rc.ps1
2+
3+ docker build - t prometheus .
Original file line number Diff line number Diff line change 1+ docker tag prometheus stefanscherer/ prometheus- windows:1.6 .1
2+ docker tag prometheus stefanscherer/ prometheus- windows:latest
3+ docker push stefanscherer/ prometheus- windows:1.6 .1
4+ docker push stefanscherer/ prometheus- windows:latest
Original file line number Diff line number Diff line change 1+ docker run - d - p 9090 :9090 prometheus
2+ Start-Sleep 10
3+ docker logs $ (docker ps - ql)
You can’t perform that action at this time.
0 commit comments