/ PyCrypCli / Dockerfile
Dockerfile
 1  FROM python:3.10-alpine AS builder
 2  
 3  RUN apk add --no-cache build-base gcc musl-dev libffi-dev python3-dev openssl-dev cargo
 4  
 5  WORKDIR /build
 6  
 7  RUN pip install poetry
 8  
 9  COPY pyproject.toml /build/
10  COPY poetry.lock /build/
11  
12  RUN poetry install -n --no-root
13  
14  COPY README.md /build/
15  COPY PyCrypCli /build/PyCrypCli
16  
17  RUN poetry build
18  
19  
20  FROM python:3.10-alpine
21  
22  LABEL org.opencontainers.image.source=https://github.com/Defelo/PyCrypCli
23  
24  COPY --from=builder /build/dist/*.whl /tmp/
25  RUN pip install /tmp/*.whl && rm /tmp/*.whl
26  
27  CMD ["pycrypcli"]