From 747705ec49cf13055404449e85dc78810f714bf9 Mon Sep 17 00:00:00 2001 From: Fabio Ponciroli Date: Thu, 25 Jun 2020 12:52:45 +0200 Subject: [PATCH] Provide Dockerfile to allow dockerization of ECS Service Discovery --- Dockerfile | 12 ++++++++++++ requirements.txt | 1 + 2 files changed, 13 insertions(+) create mode 100644 Dockerfile create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..64bf6b6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.8.3-slim-buster + +RUN mkdir -p /prometheus/ecs && \ + chown -R nobody /prometheus + +COPY requirements.txt /prometheus +COPY discoverecs.py /prometheus +RUN pip3 install -r /prometheus/requirements.txt + +USER nobody + +ENTRYPOINT ["python", "/prometheus/discoverecs.py", "--directory", "/prometheus/ecs"] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2d2963a --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +boto3==1.14.9