diff --git a/4.0.0-alpha.2/Dockerfile b/4.0.0-alpha.2/Dockerfile index be23aa9..2b76c74 100644 --- a/4.0.0-alpha.2/Dockerfile +++ b/4.0.0-alpha.2/Dockerfile @@ -1,8 +1,8 @@ FROM jetty:9-jre8 -ENV GN_FILE geonetwork.war +ENV GN_FILE GeoNetwork-4.0.0-alpha.2.war ENV GN_VERSION 4.0.0-alpha.2 -ENV GN_DOWNLOAD_MD5 TODO +ENV GN_DOWNLOAD_MD5 f6090659f67b313637760882e256c23b USER root RUN apt-get -y update && \ @@ -15,12 +15,12 @@ RUN apt-get -y update && \ USER jetty RUN cd /var/lib/jetty/webapps/geonetwork/ && \ - curl -fSL -o $GN_FILE \ - https://sourceforge.net/projects/geonetwork/files/GeoNetwork_unstable_development_versions/${GN_VERSION}/geonetwork.war/download && \ - echo "$GN_DOWNLOAD_MD5 *${GN_FILE}" | md5sum -c \ + curl -fSL -o geonetwork.war \ + https://sourceforge.net/projects/geonetwork/files/GeoNetwork_unstable_development_versions/${GN_VERSION}/$GN_FILE/download && \ + echo "$GN_DOWNLOAD_MD5 *geonetwork.war" | md5sum -c && \ unzip geonetwork.war && \ rm geonetwork.war COPY ./docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] -CMD [ "jetty.start" ] +CMD ["jetty.start"] diff --git a/4.0.0-alpha.2/Dockerfile.local b/4.0.0-alpha.2/Dockerfile.local index f4a4292..b36bb28 100644 --- a/4.0.0-alpha.2/Dockerfile.local +++ b/4.0.0-alpha.2/Dockerfile.local @@ -18,4 +18,4 @@ RUN cd /var/lib/jetty/webapps/geonetwork/ && \ COPY ./docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] -CMD [ "jetty.start" ] \ No newline at end of file +CMD ["jetty.start"] \ No newline at end of file diff --git a/4.0.0-alpha.2/README.md b/4.0.0-alpha.2/README.md index 233caf1..1aa46d2 100644 --- a/4.0.0-alpha.2/README.md +++ b/4.0.0-alpha.2/README.md @@ -4,25 +4,32 @@ 1. Clone this repository -```shell +```shell script git clone https://github.com/geonetwork/docker-geonetwork.git cd docker-geonetwork/4.0.0-alpha.2 ``` 2. Run the docker-composition from the current directory: -```shell +```shell script docker-compose up ``` 3. Open http://localhost:8080/geonetwork/ in a browser +## Build docker image + +If not published, you can build the image locally using: + +```shell script +docker build . +``` ## Running with remote Elasticsearch -```shell +```shell script docker run -p 8080:8080 \ -e "GEONETWORK_DB_NAME=/tmp/gndb" \ -e "ES_HOST=my-elasticsearch-host" \ @@ -45,7 +52,7 @@ discovery.seed_hosts: [] This directory includes two Dockerfiles: -* `Dockerfile` is cannonical one used to generate the Docker Hub official +* `Dockerfile` is canonical one used to generate the Docker Hub official image. It downloads GeoNetwork 4.0.0-alpha.2 WAR file from sourceforge. * `Dockerfile.local` needs a `geonetwork.war` file next to it to build the image. @@ -61,7 +68,7 @@ It also includes two docker-compose configuration files. To use the pre-built image you can use the `docker-compose.yml` file provided in this directory: -```shell +```shell script docker-compose up ``` @@ -73,7 +80,7 @@ To be able to generate an elasticsearch-ready docker image, you will have: 2. Clone this repository -```shell +```shell script git clone https://github.com/geonetwork/docker-geonetwork.git cd docker-geonetwork/4.0.0-alpha.2 ``` @@ -86,7 +93,7 @@ cp ../../core-geonetwork/web/target/geonetwork.war . 4. Run the docker-composition from the current directory: -```shell +```shell script docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build ``` @@ -97,7 +104,7 @@ docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build See "Connecting to a postgres database" https://hub.docker.com/_/geonetwork -```shell +```shell script docker run --name geonetwork -d -p 8080:8080 \ -e GEONETWORK_DB_TYPE=postgres \ -e GEONETWORK_DB_HOST=my-db-host \