File: Dockerfile

package info (click to toggle)
python-openapi-spec-validator 0.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 772 kB
  • sloc: python: 2,050; makefile: 54
file content (21 lines) | stat: -rw-r--r-- 603 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ARG OPENAPI_SPEC_VALIDATOR_VERSION=0.7.1

FROM python:3.12.0-alpine as builder

ARG OPENAPI_SPEC_VALIDATOR_VERSION

ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

RUN apk add --no-cache cargo
RUN python -m pip wheel --wheel-dir /wheels openapi-spec-validator==${OPENAPI_SPEC_VALIDATOR_VERSION}

FROM python:3.12.0-alpine

ARG OPENAPI_SPEC_VALIDATOR_VERSION

COPY --from=builder /wheels /wheels
RUN apk add --no-cache libgcc
RUN pip install --no-cache-dir --pre --find-links /wheels openapi-spec-validator==${OPENAPI_SPEC_VALIDATOR_VERSION} && \
    rm -r /wheels

ENTRYPOINT ["openapi-spec-validator"]