| 1 |
# internal users should provide MCR registry to build via 'docker build . --build-arg REGISTRY="mcr.microsoft.com/mirror/docker/library/"' |
| 2 |
# public OSS users should simply leave this argument blank or ignore its presence entirely |
| 3 |
ARG REGISTRY="mcr.microsoft.com/mirror/docker/library/" |
| 4 |
FROM ${REGISTRY}ubuntu:18.04 |
| 5 |
|
| 6 |
# To test a script: |
| 7 |
# docker run --rm -it -v %cd%:/data local/valgrind |
| 8 |
# python3.6 -m pip install -e . |
| 9 |
# valgrind --tool=memcheck --suppressions=valgrind-python.supp --leak-check=full python3.6 ./test_script.py &> valgrind_log.txt |
| 10 |
|
| 11 |
# Install Python 3.6 |
| 12 |
RUN apt-get update |
| 13 |
RUN apt-get install -y software-properties-common vim |
| 14 |
RUN add-apt-repository ppa:jonathonf/python-3.6 |
| 15 |
RUN apt-get update |
| 16 |
|
| 17 |
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv libc6-dbg curl |
| 18 |
RUN apt-get install -y libssl-dev uuid-dev cmake libcurl4-openssl-dev pkg-config |
| 19 |
|
| 20 |
# update pip |
| 21 |
RUN python3.6 -m pip install pip --upgrade |
| 22 |
RUN python3.6 -m pip install wheel cython |
| 23 |
|
| 24 |
|
| 25 |
# Install Valgrind |
| 26 |
RUN cd /tmp && \ |
| 27 |
curl -O ftp://sourceware.org/pub/valgrind/valgrind-3.13.0.tar.bz2 && \ |
| 28 |
tar xvf valgrind-3.13.0.tar.bz2 && \ |
| 29 |
cd valgrind-3.13.0 && \ |
| 30 |
./configure && \ |
| 31 |
make && \ |
| 32 |
make install |
| 33 |
|
| 34 |
ENV PYTHONMALLOC=malloc |
| 35 |
ENTRYPOINT [ "/bin/bash" ] |