File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ ARG IMAGE=debian:stable
2+ FROM $IMAGE
3+
4+ RUN apt-get update && \
5+ DEBIAN_FRONTEND="noninteractive" apt-get install -y gcc python3 python3-dev softhsm2 openssl && \
6+ rm -rf /var/lib/apt/lists/*
7+
8+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
9+
10+ WORKDIR /test
11+
12+ ADD uv.lock pyproject.toml setup.py .
13+ ADD pkcs11/ pkcs11/
14+ ADD extern/ extern/
15+
16+ ENV UV_LINK_MODE=copy
17+ RUN --mount=type=cache,target=/root/.cache/uv \
18+ uv sync --all-extras
19+
20+ ENV PKCS11_MODULE=/usr/lib/softhsm/libsofthsm2.so
21+ ENV PKCS11_TOKEN_LABEL=TEST
22+ ENV PKCS11_TOKEN_PIN=1234
23+ ENV PKCS11_TOKEN_SO_PIN=5678
24+ RUN softhsm2-util --init-token --free --label TEST --pin 1234 --so-pin 5678
25+
26+ ADD tests/ tests/
27+ CMD ["uv" , "run" , "pytest" , "-v" ]
You can’t perform that action at this time.
0 commit comments