adjust image name
This commit is contained in:
parent
f01f68abfa
commit
5cabc85773
13
README.md
13
README.md
@ -3,4 +3,17 @@ 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.
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
Open a terminal into your container to use gcc/valgrind, you can do:
|
||||||
|
|
||||||
|
docker run --rm -it -v `pwd`:/app dliu/ubuntu-gcc-valgrind /bin/bash
|
||||||
|
root@xxxx# <enter commands here>
|
||||||
|
|
||||||
|
You can also directly invoke commands (gcc, valgrind, etc) like this:
|
||||||
|
|
||||||
|
docker run --rm -it -v `pwd`:/app dliu/ubuntu-gcc-valgrind gcc -c hello.c
|
||||||
|
docker run --rm -it -v `pwd`:/app dliu/ubuntu-gcc-valgrind valgrind ./a.out
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
build.sh
2
build.sh
@ -1,3 +1,3 @@
|
|||||||
# To build the image from Dockerfile, use this command:
|
# To build the image from Dockerfile, use this command:
|
||||||
#docker build -t="dliu/valgrind" .
|
#docker build -t="dliu/ubuntu-gcc-valgrind" .
|
||||||
|
|
||||||
|
2
run.sh
2
run.sh
@ -1,4 +1,4 @@
|
|||||||
# The workdir is set to be /app. Run your image mounting your
|
# The workdir is set to be /app. Run your image mounting your
|
||||||
# application directory to /app like below:
|
# application directory to /app like below:
|
||||||
docker run --rm -it -v `pwd`:/app dliu/valgrind /bin/bash
|
docker run --rm -it -v `pwd`:/app dliu/ubuntu-gcc-valgrind /bin/bash
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user