-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docker container. Prototype, under construction
- Loading branch information
1 parent
6df7dba
commit b0336af
Showing
5 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM gcc:7 | ||
|
||
ENV CPPUTEST_HOME=/usr/src/cpputest | ||
|
||
ADD cpputest /usr/src/cpputest | ||
|
||
WORKDIR /usr/src/cpputest | ||
|
||
RUN ./autogen.sh && ./configure && make tdd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
!!!! Under construction !!!! | ||
|
||
|
||
Define the host system directory to mount and the container working directory | ||
``` | ||
MOUNT_DIR=$PWD:/usr/src/myapp | ||
WORKING_DIR=/usr/src/myapp | ||
``` | ||
|
||
Get and run the gcc v7 gcc image | ||
``` | ||
docker images | ||
docker pull gcc:7 | ||
docker images | ||
docker run -it -v $MOUNT_DIR -w $WORKING_DIR gcc:7 /bin/bash | ||
gcc -v | ||
``` | ||
|
||
Build a docker image from Dockerfiles/cpputest3_8.gcc7 and run a bash shell in it | ||
``` | ||
docker build -t jamesgrenning/cpputest3_8.gcc7 -f Dockerfiles/cpputest3_8.gcc7 . | ||
docker run -it -v $MOUNT_DIR -w $WORKING_DIR jamesgrenning/cpputest3_8.gcc7 /bin/bash | ||
make | ||
``` | ||
|
||
Now you are all set to edit in the native environment and run tests in the Docker container. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Add cpputest as a submodule | ||
``` | ||
git submodule add git@github.com:cpputest/cpputest.git | ||
cat .gitmodules | ||
git commit -m "Added cpputest as a submodule" | ||
``` |