From ee8be1c7bc441c56fee7f32e934e6f2c993b1854 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Thu, 20 Apr 2023 04:24:37 +0200 Subject: [PATCH] initial commit --- .drone.yml | 22 ++++++++++++++++++++++ Dockerfile | 19 +++++++++++++++++++ README.md | 1 + 3 files changed, 42 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 README.md diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..5f68a88 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,22 @@ +kind: pipeline +type: docker +name: storagebox-exporter + +steps: +- name: go-build + image: golang + commands: + - git clone https://github.com/prometheus/alertmanager.git + - cd alertmanager + - make build + - ls -lAh + - ls ? +- name: docker-build + image: plugins/docker + settings: + username: + from_secret: DOCKER_USERNAME + password: + from_secret: DOCKER_PASSWORD + repo: aaronriedel/alertmanager + tags: latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..930e845 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +ARG ARCH="amd64" +ARG OS="linux" +FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest +LABEL maintainer="The Prometheus Authors " + +COPY alertmanager/amtool /bin/amtool +COPY alertmanager/alertmanager /bin/alertmanager +COPY alertmanager/examples/ha/alertmanager.yml /etc/alertmanager/alertmanager.yml + +RUN mkdir -p /alertmanager && \ + chown -R nobody:nobody etc/alertmanager /alertmanager + +USER nobody +EXPOSE 9093 +VOLUME [ "/alertmanager" ] +WORKDIR /alertmanager +ENTRYPOINT [ "/bin/alertmanager" ] +CMD [ "--config.file=/etc/alertmanager/alertmanager.yml", \ + "--storage.path=/alertmanager" ] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..7f0a5ed --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +[![Build Status](https://drone.ar21.de/api/badges/aaron/alertmanager-build/status.svg)](https://drone.ar21.de/aaron/alertmanager-build) \ No newline at end of file