Simplify and debloat running docker container
Change-Id: I74f467694f1c6f5b75564ce546fae31b34b50d8f
diff --git a/Dockerfile b/Dockerfile
index 3adc1c6..93f9a07 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -47,6 +47,7 @@
make && \
make install
+RUN rm -rf example-models
ENV MOJO_CONFIG=/config/derekovecs.conf
diff --git a/README.md b/README.md
index e8f1b06..293d78c 100644
--- a/README.md
+++ b/README.md
@@ -118,32 +118,26 @@
GET 'http://localhost:3000/getCollocationAssociation?w=Grund&c=diesem'
```
-## Build and run using docker / podman
+## (Build and) run using docker / podman
-### Build image
+### Optional: Build docker image from source
```bash
-docker build -t ids-kl/derekovecs .
+docker build -t idscorpuslinguistics/derekovecs .
```
### Optional: Slim down image using [Slim(toolkit)](https://github.com/slimtoolkit/slim)
```bash
-slim build --new-expose=3000 --http-probe-ports=3000 --include-path /usr/local --mount $(pwd)/config:/config:z ids-kl/derekovecs
+slim build --new-expose=3000 --http-probe-ports=3000 --include-path /usr/local --mount $(pwd)/config:/config:z idscorpuslinguistics/derekovecs
```
Will build an image `ids-kl/derekovecs.slim` reduced to ~25% of the original size.
-### Copy configuration to make it mountable
-
-```bash
-mkdir config
-cp example.conf config/derekovecs.conf
-```
### Run docker image
``` bash
-docker run -d=false -p 3000:3000 --rm -v $(pwd)/config:/config:z ids-kl/derekovecs
+docker run -v ./example-models:/example-models:z -e MOJO_CONFIG=/example-models/example-docker.conf -p 3000:3000 idscorpuslinguistics/derekovecs
```
## Client library for R