From 4dc2faed267e933f6b969d39bb085e9de58b503d Mon Sep 17 00:00:00 2001 From: Jegath S Date: Mon, 7 Aug 2023 12:02:12 +0530 Subject: [PATCH] added docekrfile --- Dockerfile | 31 +++++++++++++++++++++++++++++++ requirements.txt | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..564ef75 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM python:3.10-slim as build + +RUN apt-get update +RUN apt-get install -y --no-install-recommends build-essential gcc + +WORKDIR /usr/app + +RUN python -m venv /usr/app/venv +ENV PATH="/usr/app/venv/bin:$PATH" + +copy requirements.txt . + +RUN pip install -r requirements.txt + +# FROM python:3.12.0b3-slim@sha256:8e3ef64883278384c49293caf631d614b4bfdac7bb494d44e17cf2d711ce2652 +FROM python:3.10-slim@sha256:2bac43769ace90ebd3ad83e5392295e25dfc58e58543d3ab326c3330b505283d + +RUN groupadd -g 999 python && \ + useradd -r -u 999 -g python python + +RUN mkdir /usr/app && chown python:python /usr/app +WORKDIR /usr/app +COPY --chown=python:python --from=build /usr/app/venv ./venv +COPY --chown=python:python . . + +USER 999 + +ENV PATH="/usr/app/venv/bin:$PATH" + +CMD ["bash"] + diff --git a/requirements.txt b/requirements.txt index 1b7568a..44aabcd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,5 @@ click==8.1.3 clickhouse-driver==0.2.6 requests==2.31.0 questionary==1.10.0 -tabulate==0.9.0 \ No newline at end of file +tabulate==0.9.0 +kubernetes==27.2.0 \ No newline at end of file