From 18d5f35a23b87c29380238f2d90df146ae3fc688 Mon Sep 17 00:00:00 2001 From: William Wolf Date: Tue, 22 Aug 2023 22:39:02 -0500 Subject: [PATCH 1/2] Add rust and cargo deps, so wheel can be compiled for cryptography, which now needs rust Reference: https://github.com/docker/docs/pull/12334 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index da18a0d..9573be1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.17 RUN apk add --no-cache py3-pip openssl \ - python3-dev openssl-dev libffi-dev musl-dev gcc + python3-dev openssl-dev libffi-dev musl-dev gcc rust cargo RUN pip install pykmip From c66a2c8f837d126d4994d5e60b711da2d48f279b Mon Sep 17 00:00:00 2001 From: William Wolf Date: Wed, 6 Sep 2023 11:35:52 -0500 Subject: [PATCH 2/2] remove build-deps after build to keep image size small --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9573be1..b11b0f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ FROM alpine:3.17 -RUN apk add --no-cache py3-pip openssl \ - python3-dev openssl-dev libffi-dev musl-dev gcc rust cargo +RUN apk add --no-cache py3-pip openssl -RUN pip install pykmip +RUN apk add --no-cache --virtual build-deps \ + python3-dev openssl-dev libffi-dev musl-dev gcc rust cargo && \ + pip install pykmip && \ + apk del build-deps RUN mkdir -p /etc/pykmip \ mkdir -p /etc/pykmip/policy \