Skip to content

Commit 98cace1

Browse files
committed
updated instructions for Docker
1 parent 3bd3ed7 commit 98cace1

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

Docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Run `duplo --help` on the command line to see the detailed options.
2424

2525
```bash
2626
# unix
27-
> find . \( -iname "*.cpp" -o -iname "*.h" \) | docker run dlidstrom/duplo - out.txt
27+
> find . \( -iname "*.cpp" -or -iname "*.h" \) | docker run --rm -i -w /src -v $(pwd):/src duplo - out.txt
2828

2929
# windows
30-
> Get-ChildItem -Include "*.cpp", "*.h" -Recurse | % { $_.FullName } | docker run dlidstrom/duplo - out.txt
30+
> Get-ChildItem -Include "*.cpp", "*.h" -Recurse | % { $_.FullName } | docker run --rm -i -w /src -v $(pwd):/src duplo - out.txt
3131
```
3232
3333
`duplo` will write the duplicated blocks into `out.txt`.

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- [1.8.3. Additional Language Support](#183-additional-language-support)
2323
- [1.8.4. Language Suggestions](#184-language-suggestions)
2424
- [1.9. Changes](#19-changes)
25-
- [1.10. 1.10. License](#110-110-license)
25+
- [1.10. License](#110-license)
2626

2727
## 1.1. General Information
2828

@@ -79,13 +79,14 @@ src\engine\geometry\SkinnedMeshGeometry.cpp(45)
7979

8080
### 1.4.1. Docker
8181

82-
If you have Docker, the easiest way to run Duplo is to:
82+
If you have Docker, the way to run Duplo is to use this command:
8383

8484
```bash
85-
> docker run dlidstrom/duplo
85+
# Docker on unix
86+
> docker run --rm -i -w /src -v $(pwd):/src dlidstrom/duplo
8687
```
8788

88-
This pulls the latest image and runs duplo. In the usage section below, use this command in place of `duplo` or `Duplo.exe`.
89+
This pulls the latest image and runs duplo. Note that you'll have to pipe the filenames into this command. A complete commandline sample will be shown below.
8990

9091
### 1.4.2. Pre-built binaries
9192

@@ -103,13 +104,16 @@ Run `duplo --help` on the command line to see the detailed options.
103104

104105
```bash
105106
# unix
106-
> find . \( -iname "*.cpp" -o -iname "*.h" \) | duplo - out.txt
107+
> find . -type f \( -iname "*.cpp" -o -iname "*.h" \) | duplo - out.txt
107108

108109
# windows
109110
> Get-ChildItem -Include "*.cpp", "*.h" -Recurse | % { $_.FullName } | Duplo.exe - out.txt
111+
112+
# Docker on unix
113+
> find . -type f \( -iname "*.cpp" -or -iname "*.h" \) | docker run --rm -i -w /src -v $(pwd):/src dlidstrom/duplo - out.txt
110114
```
111115
112-
`duplo` will write the duplicated blocks into `out.txt`.
116+
In each of the above commands, `duplo` will write the duplicated blocks into `out.txt` in addition to the information written to stdout.
113117
114118
### 1.5.2. Passing files using file
115119
@@ -123,8 +127,14 @@ Run `duplo --help` on the command line to see the detailed options.
123127
# windows
124128
> Get-ChildItem -Include "*.cpp", "*.h" -Recurse | % { $_.FullName } | Out-File -encoding ascii files.lst
125129
> Duplo.exe files.lst out.txt
130+
131+
# Docker on unix
132+
> find . -type f \( -iname "*.cpp" -o -iname "*.h" \) > files.lst
133+
> docker run --rm -i -w /src -v $(pwd):/src dlidstrom/duplo files.lst out.txt
126134
```
127135
136+
Again, the duplicated blocks are written to `out.txt`.
137+
128138
### 1.5.3. Xml output
129139
130140
Duplo can also output xml and there is a stylesheet that will format the result for viewing in a browser. This can be used as a report tab in your continuous integration tool (TeamCity, etc).
@@ -216,7 +226,7 @@ Send me a pull request!
216226
- Fixed limitation of total number of lines of code
217227
- Checking of arbitrary files
218228
219-
## 1.10. 1.10. License
229+
## 1.10. License
220230
221231
Duplo is free software; you can redistribute it and/or modify
222232
it under the terms of the GNU General Public License as published by

0 commit comments

Comments
 (0)