Makefile.amIMAGE = zerolabssyseng/prometheus
clean-local:
docker rmi $(CLEAN_OPTIONS) $(IMAGE):$(TAG) || true
build:
docker build $(BUILD_OPTIONS) --build-arg TAG=${TAG} -t $(IMAGE):$(TAG) .
pull:
docker pull $(PULL_OPTIONS) $(IMAGE):$(TAG)
push: build
docker push $(PUSH_OPTIONS) $(IMAGE):$(TAG)
makemake [options]:
clean-local
build
pull
push
# ================================================================================================
# GET PROMETHEUS FROM CONTAINER "BUILDER"
# ================================================================================================
ARG TAG
FROM prom/prometheus:${TAG:-latest} as prometheus
# ================================================================================================
# BUILD MAIN CONTAINER
# ================================================================================================
ARG TAG
FROM zerolabssyseng/base-consul:${TAG:-latest}
MAINTAINER "System Engineer (SysEng)"
COPY rootfs/ /
COPY --from=prometheus /bin/prometheus /bin/prometheus
COPY --from=prometheus /bin/prometheus /bin/promtool
COPY --from=prometheus /bin/prometheus /usr/share/prometheus/console_libraries
COPY --from=prometheus /bin/prometheus /usr/share/prometheus/consoles
VOLUME [ "/prometheus" ]
WORKDIR [ "/prometheus" ]
ENTRYPOINT [ "/bin/prometheus" ]
CMD [ "--config.file=/etc/prometheus/prometheus.yml", \
"--storage.tsdb.path=/prometheus", \
"--web.console.libraries=/etc/prometheus/console_libraries", \
"--web.console.templates=/etc/prometheus/consoles", \
"--storage.tsdb.retention=200h", \
"--web.enable-lifecycle" ]
EXPOSE 9090
version: '3.5'
volumes:
prometheus:
services:
prometheus:
image: zerolabssyseng/prometheus:latest
container_name: zerolabssyseng_prometheus
user: root
privileged: true
ports:
- "9090:9090"
volumes:
- /etc/localtime:/etc/localtime:ro
- /proc:/usr/proc:ro
- /sys:/usr/sys:ro
- /:/rootfs:ro
environment:
- ENV=local # environment name
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention=200h'
- '--web.enable-lifecycle'
Content type
Image
Digest
Size
135.3 MB
Last updated
almost 7 years ago
docker pull zerolabssyseng/prometheus