Skip to content

Commit 96e01d9

Browse files
authored
Merge pull request #229 from vlcinsky/feat_dockerreadme
Added docker (build/usage) instructions into README.md
2 parents 8235153 + d6232b2 commit 96e01d9

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,40 @@ contains the new header information:
194194
$ ./replaceHeader old.hdt new.hdt new-header.nt
195195
```
196196

197+
## Building docker image
198+
199+
Alternatively, the tools can be used via docker.
200+
201+
To build the docker image (using arbitrary name `hdt`):
202+
203+
```sh
204+
docker build -t hdt .
205+
```
206+
207+
## Using tools via docker image
208+
209+
Asssuming you have built docker image named `hdt`:
210+
211+
```sh
212+
docker run -it --rm -v $PWD:/workdir hdt bash
213+
root@abcd1234:/workdir#
214+
```
215+
This starts the docker image interactively. Listing files within running container shall show files from your current directory.
216+
217+
To run whatever command from hdt toolset:
218+
219+
```sh
220+
root@abcd1234:/workdir# rdf2hdt -f turtle input.ttl output.hdt
221+
```
222+
To quit the running container, use `exit` command.
223+
224+
HDT commands can be also called directly from the (docker) host system:
225+
226+
```sh
227+
docker run --rm -v $PWD:/workdir hdt rdf2hdt -f turtle input.ttl output.hdt
228+
```
229+
This takes `input.ttl` from current directory and create new `output.hdt` one.
230+
197231
## Contributing
198232

199233
Contributions are welcome! Please base your contributions and pull

0 commit comments

Comments
 (0)