diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f9b0fb0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +#use 32-bit ubuntu 12.04 required by valgrind. 64-bit has some known issues +from shawn/ubuntu-precise-i386 +MAINTAINER David Liu + +LABEL Description="Do your C/C++ development in Docker container. Based on Ubuntu, and added build-essential and valgrind so you can use g++/gcc/gdb/valgrind." + + +#adds gcc valgrind +run apt-get install -y build-essential valgrind + +WORKDIR /app +CMD /bin/bash diff --git a/README.md b/README.md new file mode 100644 index 0000000..43340ef --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +Dockerfiles for building with g++/gcc on Ubuntu with valgrind and gdb + +Getting Valgrind to work is a pain on non-Linux systems like Windows and MacOS. dliu/ubuntu-gcc-valgrind is an image that combines Valgrind with the normal build chains for C/C++ including gdb, gcc, g++, etc. + + + diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..67a058f --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +# To build the image from Dockerfile, use this command: +#docker build -t="dliu/valgrind" . + diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..7b1aff6 --- /dev/null +++ b/run.sh @@ -0,0 +1,4 @@ +# The workdir is set to be /app. Run your image mounting your +# application directory to /app like below: +docker run --rm -it -v `pwd`:/app dliu/valgrind /bin/bash +