github.com/thanos-io/thanos@v0.32.5/.devcontainer/Dockerfile (about) 1 # For details, see https://github.com/devcontainers/images/tree/main/src/go 2 FROM mcr.microsoft.com/devcontainers/go:0-1.21 3 4 RUN echo "Downloading prometheus..." \ 5 && curl -sSL -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/prometheus/prometheus/tags" -o /tmp/tags.json \ 6 && VERSION_LIST="$(jq -r '.[] | select(.name | contains("rc") | not) | .name | split("v") | .[1]' /tmp/tags.json | tr -d '"' | sort -rV)" \ 7 && PROMETHEUS_LATEST_VERSION="$(echo "${VERSION_LIST}" | head -n 1)" \ 8 && PROMETHEUS_FILE_NAME="prometheus-${PROMETHEUS_LATEST_VERSION}.linux-amd64" \ 9 && curl -fsSLO "https://github.com/prometheus/prometheus/releases/download/v${PROMETHEUS_LATEST_VERSION}/${PROMETHEUS_FILE_NAME}.tar.gz" \ 10 && tar -xzf "${PROMETHEUS_FILE_NAME}.tar.gz" \ 11 && rm "${PROMETHEUS_FILE_NAME}.tar.gz" \ 12 && mv ${PROMETHEUS_FILE_NAME}/prometheus /go/bin/ 13 14 ENV GOPROXY "https://proxy.golang.org" 15 16 COPY .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt