From 722a0b01c0e6855b44b50362831e57cef12956e1 Mon Sep 17 00:00:00 2001 From: Italo Santos Date: Thu, 25 Feb 2021 10:56:54 -0300 Subject: [PATCH] fix: use python base image and fix pip version issue (#43) --- agent/docker/python/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/agent/docker/python/Dockerfile b/agent/docker/python/Dockerfile index 4e5eefb..3a1deaa 100644 --- a/agent/docker/python/Dockerfile +++ b/agent/docker/python/Dockerfile @@ -4,14 +4,16 @@ ADD . /go/src/github.com/VerizonMedia/kubectl-flame RUN go get -d -v ./... RUN cd agent && go build -o /go/bin/agent -FROM alpine AS pyspybuild -RUN apk add python3 py3-pip -RUN echo 'manylinux1_compatible = True' > /usr/lib/python3.8/site-packages/_manylinux.py +FROM python:3.8-alpine AS pyspybuild +# only works with pip version 20.2.4 +# https://github.com/benfred/py-spy/issues/353 +RUN pip install pip==20.2.4 +RUN echo 'manylinux1_compatible = True' > /usr/local/lib/python3.8/site-packages/_manylinux.py RUN pip3 install py-spy==0.4.0.dev1 -FROM alpine +FROM python:3.8-alpine RUN mkdir /app COPY --from=agentbuild /go/bin/agent /app/agent -COPY --from=pyspybuild /usr/bin/py-spy /app/py-spy +COPY --from=pyspybuild /usr/local/bin/py-spy /app/py-spy CMD [ "/app/agent" ] \ No newline at end of file