###### tags: `h2beaver`
# 2019 Jun 29 build docker again for new version
## clean all containers and images
## build a docker again
Follow and use https://gitlab.com/h2beaver/catchment-generator/
Execute ``` docker build -t catchment-generator . ```
## check docker status
`$ docker images`
```
REPOSITORY TAG IMAGE ID CREATED SIZE
catchment-generator latest 4d4c7c5a299f 5 days ago 1.45GB
mundialis/grass-gis-stable latest 8ef9afda02c9 6 weeks ago 1.45GB
hello-world latest fce289e99eb9 6 months ago 1.84kB
```
`$ docker container ls -a`
```
build
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5ac39dfc265b catchment-generator "python App.py -d te…" 11 minutes ago Exited (1) 7 minutes ago sad_bhabha
```
## result
Do `mvn compile` in `catchment-yilan-vector` (https://140.124.61.32/h2beaver/catchment-yilan-vector)
```typescript=
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< h2beaver:catchment-yilan-vector >-------------------
[INFO] Building Test to use maven to pack data 1.1-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
Downloading from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/h2beaver/select-basin/1.2-SNAPSHOT/maven-metadata.xml
Downloaded from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/h2beaver/select-basin/1.2-SNAPSHOT/maven-metadata.xml (355 B at 581 B/s)
Downloading from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/h2beaver/terrain-taiwan-raster_20m/2016-SNAPSHOT/maven-metadata.xml
Downloaded from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/h2beaver/terrain-taiwan-raster_20m/2016-SNAPSHOT/maven-metadata.xml (369 B at 13 kB/s)
Downloading from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/h2beaver/river-yilan-vector/20190430-SNAPSHOT/maven-metadata.xml
Downloaded from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/h2beaver/river-yilan-vector/20190430-SNAPSHOT/maven-metadata.xml (366 B at 17 kB/s)
[INFO]
[INFO] --- maven-dependency-plugin:3.1.1:unpack-dependencies (unpack-dependencies) @ catchment-yilan-vector ---
Downloading from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/h2beaver/select-basin/1.2-SNAPSHOT/select-basin-1.2-20190627.100754-1-resources.jar
Downloading from archiva.internal: https://h2-archiva.pointing.tw/repository/internal/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1-resources.jar
Downloading from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1-resources.jar
Downloading from central: https://repo.maven.apache.org/maven2/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1-resources.jar
Downloading from archiva.internal: https://h2-archiva.pointing.tw/repository/internal/junit/junit/4.10/junit-4.10-resources.jar
Downloading from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/junit/junit/4.10/junit-4.10-resources.jar
Downloading from central: https://repo.maven.apache.org/maven2/junit/junit/4.10/junit-4.10-resources.jar
Downloading from archiva.internal: https://h2-archiva.pointing.tw/repository/internal/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-resources.jar
Downloading from archiva.snapshots: https://h2-archiva.pointing.tw/repository/snapshots/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-resources.jar
Downloading from central: https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-resources.jar
[INFO] Unpacking /home/y56/.m2/repository/h2beaver/select-basin/1.2-SNAPSHOT/select-basin-1.2-SNAPSHOT-resources.zip to /home/y56/h2beaver-140-124-61-32/catchment-yilan-vector/workspace/select-basin-resources-zip with includes "" and excludes ""
[INFO] Unpacking /home/y56/.m2/repository/h2beaver/terrain-taiwan-raster_20m/2016-SNAPSHOT/terrain-taiwan-raster_20m-2016-SNAPSHOT-resources.zip to /home/y56/h2beaver-140-124-61-32/catchment-yilan-vector/workspace/terrain-taiwan-raster_20m-resources-zip with includes "" and excludes ""
[INFO] Unpacking /home/y56/.m2/repository/h2beaver/river-yilan-vector/20190430-SNAPSHOT/river-yilan-vector-20190430-SNAPSHOT-resources.zip to /home/y56/h2beaver-140-124-61-32/catchment-yilan-vector/workspace/river-yilan-vector-resources-zip with includes "" and excludes ""
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default) @ catchment-yilan-vector ---
2560 is found
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (catchment-generation) @ catchment-yilan-vector ---
[WARNING] Parameter tasks is deprecated, use target instead
[INFO] Executing tasks
main:
[exec] selected.geojson
[exec] docker run -v /home/y56/h2beaver-140-124-61-32/catchment-yilan-vector/workspace:/storage catchment-generator App.py -d terrain-taiwan-raster_20m-resources-zip/dem_20m.tif -c river-yilan-vector-resources-zip/river.geojson -s "selected.geojson" -p h2 -h 30 -w 200
[exec] Over-riding projection check
[exec] Importing raster map <h2_dem>...
[exec] 100%
[exec] projection: 99 (TWD97 / TM2 zone 121)
[exec] zone: 0
[exec] datum: towgs84=0,0,0,0,0,0,0
[exec] ellipsoid: grs80
[exec] north: 2801730
[exec] south: 2419490
[exec] west: 148310
[exec] east: 351810
[exec] nsres: 20
[exec] ewres: 20
[exec] rows: 19112
[exec] cols: 10175
[exec] cells: 194464600
[exec] Check if OGR layer <SelectedC2560_tw97> contains polygons...
[exec] 100%
[exec] Creating attribute table for layer <SelectedC2560_tw97>...
[exec] Importing 1 features (OGR layer <SelectedC2560_tw97>)...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Registering primitives...
[exec]
[exec] -----------------------------------------------------Cleaning polygons
[exec] -----------------------------------------------------
[exec] Breaking polygons...
[exec] Breaking polygons (pass 1: select break points)...
[exec] 100%
[exec] Breaking polygons (pass 2: break at selected points)...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Removing duplicates...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Breaking boundaries...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Removing duplicates...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Cleaning boundaries at nodes...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Merging boundaries...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Removing dangles...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Building areas...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Removing bridges...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Registering primitives...
[exec]
[exec] Building areas... 100%
[exec] Attaching islands...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Finding centroids for OGR layer <SelectedC2560_tw97>...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Writing centroids...
[exec] 100%
[exec] -----------------------------------------------------
[exec] 1 input polygons
[exec] Total area: 1.01505E+09 (1 areas)
[exec] -----------------------------------------------------
[exec] Copying features...
[exec] 100%
[exec] Building topology for vector map <basin_boundary@PERMANENT>...
[exec] Registering primitives...
[exec]
[exec] Building areas... 100%
[exec] Attaching islands...
[exec] 100%
[exec] Attaching centroids...
[exec] 100%
[exec] Check if OGR layer <river> contains polygons...
[exec] 100%
[exec] Creating attribute table for layer <river>...
[exec] Importing 9769 features (OGR layer <river>)...
[exec] 100%
[exec] -----------------------------------------------------
[exec] Building topology for vector map <h2_input_channel@PERMANENT>...
[exec] Registering primitives...
[exec]
[exec] Reading raster map... 100%
[exec] Processing lines...
[exec] WARNING: trying to divide by zero...no unique solution for
[exec] system...skipping...
```