Skip to content

Commit 1463fde

Browse files
committed
Fix more ```console formatting nits
1 parent e2640c2 commit 1463fde

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

geonetwork/content.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ GeoNetwork 4 uses an Elasticsearch server to store the index of the documents it
1919
This is a quick example of how to get GeoNetwork 4.4 Latest up and running for demo purposes. This configuration doesn't keep the data if containers are removed.
2020

2121
```console
22-
docker pull elasticsearch:8.19.13
23-
docker pull %%IMAGE%%:4
22+
$ docker pull elasticsearch:8.19.13
23+
$ docker pull %%IMAGE%%:4
2424

25-
docker network create gn-network
25+
$ docker network create gn-network
2626

27-
docker run -d --name my-es-host --network gn-network -e "discovery.type=single-node" -e "xpack.security.enabled=false" elasticsearch:8.19.13
28-
docker run --name %%REPO%%-host --network gn-network -e GN_CONFIG_PROPERTIES="-Des.host=my-es-host -Des.protocol=http -Des.port=9200 -Des.url=http://my-es-host:9200" -p 8080:8080 %%IMAGE%%:4
27+
$ docker run -d --name my-es-host --network gn-network -e "discovery.type=single-node" -e "xpack.security.enabled=false" elasticsearch:8.19.13
28+
$ docker run --name %%REPO%%-host --network gn-network -e GN_CONFIG_PROPERTIES="-Des.host=my-es-host -Des.protocol=http -Des.port=9200 -Des.url=http://my-es-host:9200" -p 8080:8080 %%IMAGE%%:4
2929
```
3030

3131
For GeoNetwork 4.2 Stable:
3232

3333
```console
34-
docker pull elasticsearch:7.17.15
35-
docker pull %%IMAGE%%:4.2
34+
$ docker pull elasticsearch:7.17.15
35+
$ docker pull %%IMAGE%%:4.2
3636

37-
docker network create gn-network
37+
$ docker network create gn-network
3838

39-
docker run -d --name my-es-host --network gn-network -e "discovery.type=single-node" elasticsearch:7.17.15
40-
docker run --name %%REPO%%-host --network gn-network -e ES_HOST=my-es-host -e ES_PROTOCOL=http -e ES_PORT=9200 -p 8080:8080 %%IMAGE%%:4.2
39+
$ docker run -d --name my-es-host --network gn-network -e "discovery.type=single-node" elasticsearch:7.17.15
40+
$ docker run --name %%REPO%%-host --network gn-network -e ES_HOST=my-es-host -e ES_PROTOCOL=http -e ES_PORT=9200 -p 8080:8080 %%IMAGE%%:4.2
4141
```
4242

4343
To be sure about what Elasticsearch version to use you can check the [GeoNetwork documentation](https://docs.geonetwork-opensource.org/4.4/install-guide/installing-index/) for your GN version or the `es.version` property in the [`pom.xml`](https://github.com/geonetwork/core-geonetwork/blob/main/pom.xml#L1528C17-L1528C24) file of the GeoNetwork release used.
@@ -124,15 +124,15 @@ By default GeoNetwork uses a local **H2 database** for demo use (this one is **n
124124
This command will start a Debian-based container, running a Tomcat web server, with a GeoNetwork WAR deployed on the server. Note: GeoNetwork 4.0.0-4.2.14 and 4.4.0-4.4.9 used Jetty 9 instead of Tomcat.
125125

126126
```console
127-
docker run --name some-%%REPO%% -d %%IMAGE%%
127+
$ docker run --name some-%%REPO%% -d %%IMAGE%%
128128
```
129129

130130
### Publish port
131131

132132
GeoNetwork listens on port `8080`. If you want to access the container at the host, **you must publish this port**. For instance, this, will redirect all the container traffic on port 8080, to the same port on the host:
133133

134134
```console
135-
docker run --name some-%%REPO%% -d -p 8080:8080 %%IMAGE%%
135+
$ docker run --name some-%%REPO%% -d -p 8080:8080 %%IMAGE%%
136136
```
137137

138138
Then, if you are running docker on Linux, you may access geonetwork at http://localhost:8080/geonetwork.
@@ -162,7 +162,7 @@ By default, GeoNetwork sets the data directory on `/opt/geonetwork/WEB-INF/data`
162162
Since version 4.4.0 the data directory needs to be configued using Java properties passed in the `GN_CONFIG_PROPERTIES` environment variable. For example:
163163

164164
```console
165-
docker run --name some-%%REPO%% -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn %%IMAGE%%
165+
$ docker run --name some-%%REPO%% -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn %%IMAGE%%
166166
```
167167

168168
### Persisting data
@@ -172,27 +172,27 @@ To set the data directory to `/catalogue-data/data` and H2 database file to `/ca
172172
- GeoNetwork 4.2 and older
173173

174174
```console
175-
docker run --name some-%%REPO%% -d -p 8080:8080 -e DATA_DIR=/catalogue-data/data -e GEONETWORK_DB_NAME=/catalogue-data/db/gn %%IMAGE%%:3
175+
$ docker run --name some-%%REPO%% -d -p 8080:8080 -e DATA_DIR=/catalogue-data/data -e GEONETWORK_DB_NAME=/catalogue-data/db/gn %%IMAGE%%:3
176176
```
177177

178178
- Since GeoNetwork 4.4.0
179179

180180
```console
181-
docker run --name some-%%REPO%% -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn %%IMAGE%%
181+
$ docker run --name some-%%REPO%% -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn %%IMAGE%%
182182
```
183183

184184
If you want the data directory to live beyond restarts, or even destruction of the container, you can mount a directory from the docker engine's host into the container. - `-v /host/path:/path/to/data/directory`. For instance this, will mount the host directory `/host/%%REPO%%-docker` into `/catalogue-data` on the container:
185185

186186
- GeoNetwork 4.2 and older
187187

188188
```console
189-
docker run --name some-%%REPO%% -d -p 8080:8080 -e DATA_DIR=/catalogue-data/data -e GEONETWORK_DB_NAME=/catalogue-data/db/gn -v /host/%%REPO%%-docker:/catalogue-data %%IMAGE%%:3
189+
$ docker run --name some-%%REPO%% -d -p 8080:8080 -e DATA_DIR=/catalogue-data/data -e GEONETWORK_DB_NAME=/catalogue-data/db/gn -v /host/%%REPO%%-docker:/catalogue-data %%IMAGE%%:3
190190
```
191191

192192
- GeoNetwork 4.4.0 and newer
193193

194194
```console
195-
docker run --name some-%%REPO%% -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn -v /host/%%REPO%%-docker:/catalogue-data %%IMAGE%%
195+
$ docker run --name some-%%REPO%% -d -p 8080:8080 -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn -v /host/%%REPO%%-docker:/catalogue-data %%IMAGE%%
196196
```
197197

198198
### %%COMPOSE%%

0 commit comments

Comments
 (0)