Skip to content

Commit 37e3de3

Browse files
committed
Update Dockerfile to build rpds (pyo3) dependency
1 parent 22943b0 commit 37e3de3

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

Dockerfile

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1-
FROM python:3.11-alpine
2-
31
ARG OPENAPI_SPEC_VALIDATOR_VERSION=0.6.0a1
42

5-
RUN pip install --no-cache-dir --pre openapi-spec-validator==${OPENAPI_SPEC_VALIDATOR_VERSION}
3+
FROM python:3.11.4-alpine as builder
4+
5+
ARG OPENAPI_SPEC_VALIDATOR_VERSION
6+
7+
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
8+
9+
RUN apk add --no-cache cargo
10+
RUN python -m pip wheel --wheel-dir /wheels openapi-spec-validator==${OPENAPI_SPEC_VALIDATOR_VERSION}
11+
12+
FROM python:3.11.4-alpine
13+
14+
ARG OPENAPI_SPEC_VALIDATOR_VERSION
15+
16+
COPY --from=builder /wheels /wheels
17+
RUN apk add --no-cache libgcc
18+
RUN pip install --no-cache-dir --pre --find-links /wheels openapi-spec-validator==${OPENAPI_SPEC_VALIDATOR_VERSION} && \
19+
rm -r /wheels
620

721
ENTRYPOINT ["openapi-spec-validator"]

0 commit comments

Comments
 (0)