add docker cicd
This commit is contained in:
1 parent
98c1e18aab
commit
a3e69e23d7
6 files changed
+547
-1
No files matched your search
+33
@@ -0,0 +1,33 @@
|
||||
#
|
||||
FROM python:3.10 as requirements-stage
|
||||
|
||||
#
|
||||
WORKDIR /tmp
|
||||
|
||||
#
|
||||
RUN pip install poetry
|
||||
|
||||
#
|
||||
COPY ./pyproject.toml ./poetry.lock* /tmp/
|
||||
|
||||
#
|
||||
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
|
||||
|
||||
#
|
||||
FROM python:3.10
|
||||
|
||||
#
|
||||
WORKDIR /code
|
||||
|
||||
#
|
||||
COPY --from=requirements-stage /tmp/requirements.txt /code/requirements.txt
|
||||
|
||||
#
|
||||
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
||||
|
||||
#
|
||||
COPY ./app /code/app
|
||||
|
||||
|
||||
#
|
||||
CMD ["python", "/code/app/demo.py"]
|
||||
Reference in new issue
Block a user