parent
6a79efeb71
commit
0837bf2a52
@ -0,0 +1,7 @@
|
|||||||
|
testdata
|
||||||
|
testcase
|
||||||
|
docs
|
||||||
|
example_outputs
|
||||||
|
.github
|
||||||
|
.venv
|
||||||
|
.coverage
|
@ -1,20 +1,26 @@
|
|||||||
FROM python:3.10-alpine
|
FROM python:3.10-alpine as base
|
||||||
|
ENV PYTHONFAULTHANDLER=1 \
|
||||||
|
PYTHONHASHSEED=random \
|
||||||
|
PYTHONUNBUFFERED=1
|
||||||
|
FROM python:3.10-alpine AS builder
|
||||||
|
ENV PIP_DEFAULT_TIMEOUT=100 \
|
||||||
|
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||||
|
PIP_NO_CACHE_DIR=1
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk upgrade && \
|
apk upgrade && \
|
||||||
apk add gcc libc-dev libffi-dev cargo && \
|
apk add gcc libc-dev libffi-dev cargo && \
|
||||||
python -m pip install --upgrade pip && \
|
python -m pip install --upgrade pip && \
|
||||||
pip install poetry
|
pip install poetry
|
||||||
|
RUN python -m venv /venv
|
||||||
|
|
||||||
COPY ["pyproject.toml", "./"]
|
COPY ["pyproject.toml", "./"]
|
||||||
|
COPY ["poetry.lock", "./"]
|
||||||
RUN poetry install
|
RUN poetry export -f requirements.txt | /venv/bin/pip install -r /dev/stdin
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN poetry build && /venv/bin/pip install dist/*.whl
|
||||||
|
|
||||||
RUN pip install .
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=builder /venv /venv
|
||||||
|
ENV PATH="/venv/bin:${PATH}"
|
||||||
CMD [ "mitmproxy2swagger" ]
|
CMD [ "mitmproxy2swagger" ]
|
||||||
|
Loading…
Reference in new issue