Skip to content

Commit

Permalink
fix: use python base image and fix pip version issue (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
italux authored Feb 25, 2021
1 parent 7d48510 commit 722a0b0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions agent/docker/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]

0 comments on commit 722a0b0

Please sign in to comment.