forked from xdocker/xgeoserver

Shane
2016-03-11 4f9f613b4ef50504576c9422009e947eeb523e6d
Add arbitrary filesystem resource overlays in build
3 files modified
1 files added
42 ■■■■■ changed files
.gitignore 11 ●●●●● patch | view | raw | blame | history
Dockerfile 6 ●●●●● patch | view | raw | blame | history
README.md 11 ●●●●● patch | view | raw | blame | history
resources/overlays/README.txt 14 ●●●●● patch | view | raw | blame | history
.gitignore
@@ -1,5 +1,8 @@
resources/geoserver.zip
resources/plugins/*.zip
resources/*jdk-*-linux-x64.tar.gz
resources/jce_policy.zip
resources/*
!resources/plugins/
resources/plugins/*
!resources/plugins/README.txt
!resources/overlays/
resources/overlays/*
!resources/overlays/README.txt
.idea
Dockerfile
@@ -77,5 +77,11 @@
      done; \
    fi
# Overlay files and directories in resources/overlays if they exist
RUN rm /tmp/resources/overlays/README.txt && \
    if ls /tmp/resources/overlays/* > /dev/null 2>&1; then \
      cp -rf /tmp/resources/overlays/* /; \
    fi;
# Delete resources after installation
RUN rm -rf /tmp/resources
README.md
@@ -63,6 +63,17 @@
`resources/plugins` before building. You should also download the matching version
GeoServer WAR zip file to `resources/geoserver.zip`.
### Building with file system overlays (advanced)
The contents of `resources/overlays` will be copied to the image file system
during the build. For example, to include a static Tomcat `setenv.sh`,
create the file at `resources/overlays/usr/local/tomcat/bin/setenv.sh`.
You can use this functionality to write a static GeoServer directory to
`/opt/geoserver/data_dir`, include additional jar files, and more.
Overlay files will overwrite existing destination files, so be careful!
## Run
You probably want to also have postgis running too. To create a running 
resources/overlays/README.txt
New file
@@ -0,0 +1,14 @@
To include files in the container file system at arbitrary locations, build
a directory structure from / here and include the files at the desired location.
For example, to include a static Tomcat setenv.sh in the build, place it at:
resources/overlays/usr/local/tomcat/bin/setenv.sh
Other overlay examples include static GeoServer data directories, the Marlin renderer, etc.
Note that overlay files will overwrite existing destination files, and that
files in the overlay root will be copied to the container root
(e.g. resources/overlay/somefile.txt will be copied to /somefile.txt).
Be careful!