This commit is contained in:
Fritz Schaal 2021-03-01 11:45:11 +01:00
parent 422e8d94cf
commit a57b737179
2 changed files with 15 additions and 3 deletions

View File

@ -22,6 +22,7 @@ RUN \
) ; \
fi && \
echo "selected prometheus branch: ${PROMETHEUS_VERSION}" && \
cd / && \
git clone \
--branch="${PROMETHEUS_VERSION}" \
--depth=1 \
@ -33,8 +34,8 @@ FROM alpine:3
COPY --from=build /prometheus/prometheus /prometheus
ARG UID=1000
ARG GID=1000
ENV UID=1000
ENV GID=1000
CMD addgroup -g "${GID}" prometheus && \
adduser -D -u "${UID}" -G prometheus prometheus && \

View File

@ -1,3 +1,14 @@
# docker-prometheus
prometheus docker build
prometheus docker build
## build
```{bash}
GO_VERSION=1.16.0 # optional
PROMETHEUS_VERSION=2.25.0 # optional, will use latest available, if unset
docker \
build \
--build-arg GO_VERSION="${GO_VERSION}" \
--build-arg PROMETHEUS_VERSION="${PROMETHEUS_VERSION}" \
-t prometheus:"${PROMETHEUS_VERSION}"-local .
```