Skip to content

Commit

Permalink
Merge pull request #14 from intelops/feat/dockerfile
Browse files Browse the repository at this point in the history
added docekrfile
  • Loading branch information
jegathintelops authored Aug 8, 2023
2 parents ac33bc2 + 4dc2fae commit dc3aec8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
tabulate==0.9.0
kubernetes==27.2.0

0 comments on commit dc3aec8

Please sign in to comment.