From c66a2c8f837d126d4994d5e60b711da2d48f279b Mon Sep 17 00:00:00 2001 From: William Wolf Date: Wed, 6 Sep 2023 11:35:52 -0500 Subject: [PATCH] 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 \