Skip to content

Commit

Permalink
Merge branch '4.0.0a2-md5'
Browse files Browse the repository at this point in the history
  • Loading branch information
juanluisrp committed Sep 16, 2020
2 parents 13b5573 + 7e5d8c3 commit 5c52510
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
12 changes: 6 additions & 6 deletions 4.0.0-alpha.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand All @@ -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"]
2 changes: 1 addition & 1 deletion 4.0.0-alpha.2/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ RUN cd /var/lib/jetty/webapps/geonetwork/ && \

COPY ./docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD [ "jetty.start" ]
CMD ["jetty.start"]
23 changes: 15 additions & 8 deletions 4.0.0-alpha.2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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.
Expand All @@ -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
```

Expand All @@ -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
```
Expand All @@ -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
```

Expand All @@ -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 \
Expand Down

0 comments on commit 5c52510

Please sign in to comment.