diff --git a/libbeat/docs/howto/load-index-templates.asciidoc b/libbeat/docs/howto/load-index-templates.asciidoc index 238b514614a..3fe67ce0875 100644 --- a/libbeat/docs/howto/load-index-templates.asciidoc +++ b/libbeat/docs/howto/load-index-templates.asciidoc @@ -150,7 +150,7 @@ ifdef::docker_platform[] ["source","sh",subs="attributes"] ---------------------------------------------------------------------- -docker run {dockerimage} setup --index-management{disable_logstash} -E 'output.elasticsearch.hosts=["localhost:9200"]' +docker run --rm {dockerimage} setup --index-management{disable_logstash} -E 'output.elasticsearch.hosts=["localhost:9200"]' ---------------------------------------------------------------------- endif::docker_platform[] @@ -354,4 +354,3 @@ endif::win_only[] PS > Invoke-RestMethod -Method Put -Uri http://localhost:9200/_data_stream/{beatname_lc}-{version} ---- endif::win_os[] - diff --git a/libbeat/docs/shared-docker.asciidoc b/libbeat/docs/shared-docker.asciidoc index 7df2bc1e940..da5088072b0 100644 --- a/libbeat/docs/shared-docker.asciidoc +++ b/libbeat/docs/shared-docker.asciidoc @@ -73,7 +73,7 @@ and machine learning jobs. Run this command: ifeval::["{beatname_lc}"=="filebeat"] ["source", "sh", subs="attributes"] -------------------------------------------- -docker run \ +docker run --rm \ {dockerimage} \ setup -E setup.kibana.host=kibana:5601 \ -E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2> @@ -83,7 +83,7 @@ endif::[] ifeval::["{beatname_lc}"=="metricbeat"] ["source", "sh", subs="attributes"] -------------------------------------------- -docker run \ +docker run --rm \ {dockerimage} \ setup -E setup.kibana.host=kibana:5601 \ -E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2> @@ -93,7 +93,7 @@ endif::[] ifeval::["{beatname_lc}"=="heartbeat"] ["source", "sh", subs="attributes"] -------------------------------------------- -docker run \ +docker run --rm \ --cap-add=NET_RAW \ {dockerimage} \ setup -E setup.kibana.host=kibana:5601 \ @@ -104,7 +104,7 @@ endif::[] ifeval::["{beatname_lc}"=="packetbeat"] ["source", "sh", subs="attributes"] -------------------------------------------- -docker run \ +docker run --rm \ --cap-add=NET_ADMIN \ {dockerimage} \ setup -E setup.kibana.host=kibana:5601 \ @@ -115,7 +115,7 @@ endif::[] ifeval::["{beatname_lc}"=="auditbeat"] ["source", "sh", subs="attributes"] -------------------------------------------- -docker run \ +docker run --rm \ --cap-add="AUDIT_CONTROL" \ --cap-add="AUDIT_READ" \ {dockerimage} \ @@ -139,7 +139,7 @@ endif::apm-server[] ==== Run {beatname_uc} on a read-only file system -If you'd like to run {beatname_uc} in a Docker container on a read-only file +If you'd like to run {beatname_uc} in a Docker container on a read-only file system, you can do so by specifying the `--read-only` option. {beatname_uc} requires a stateful directory to store application data, so with the `--read-only` option you also need to use the `--mount` option to @@ -149,9 +149,9 @@ For example: ["source", "sh", subs="attributes"] -------------------------------------------- -docker run \ - --mount type=source=$(pwd}/data,destination=/usr/share/{beatname_lc}/data - --read-only +docker run --rm \ + --mount type=bind,source=$(pwd)/data,destination=/usr/share/{beatname_lc}/data \ + --read-only \ {dockerimage} -------------------------------------------- @@ -185,7 +185,7 @@ docker run -d \ --volume="$(pwd)/{beatname_lc}.docker.yml:/usr/share/{beatname_lc}/{beatname_lc}.yml:ro" \ --volume="/var/lib/docker/containers:/var/lib/docker/containers:ro" \ --volume="/var/run/docker.sock:/var/run/docker.sock:ro" \ - --volume="registry:/usr/share/{beatname_lc}/data:rw" \ + --volume="registry:/usr/share/{beatname_lc}/data:rw" \ {dockerimage} {beatname_lc} -e --strict.perms=false \ -E output.elasticsearch.hosts=["elasticsearch:9200"] <1> <2> -------------------------------------------- diff --git a/libbeat/docs/tab-widgets/load-dashboards-logstash.asciidoc b/libbeat/docs/tab-widgets/load-dashboards-logstash.asciidoc index 141a9e7b0ab..e4327b78afc 100644 --- a/libbeat/docs/tab-widgets/load-dashboards-logstash.asciidoc +++ b/libbeat/docs/tab-widgets/load-dashboards-logstash.asciidoc @@ -49,7 +49,7 @@ // tag::docker[] ["source","sh",subs="attributes"] ---- -docker run --net="host" {dockerimage} setup -e \ +docker run --rm --net="host" {dockerimage} setup -e \ -E output.logstash.enabled=false \ -E output.elasticsearch.hosts=['localhost:9200'] \ -E output.elasticsearch.username={beat_default_index_prefix}_internal \ @@ -73,4 +73,4 @@ PS > .{backslash}{beatname_lc}.exe setup -e ` -E output.elasticsearch.password={pwd} ` -E setup.kibana.host=localhost:5601 ---- -// end::win[] \ No newline at end of file +// end::win[] diff --git a/libbeat/docs/tab-widgets/load-dashboards.asciidoc b/libbeat/docs/tab-widgets/load-dashboards.asciidoc index b204f7143d8..34b9df30ffe 100644 --- a/libbeat/docs/tab-widgets/load-dashboards.asciidoc +++ b/libbeat/docs/tab-widgets/load-dashboards.asciidoc @@ -29,7 +29,7 @@ // tag::docker[] ["source","sh",subs="attributes"] ---- -docker run --net="host" {dockerimage} setup --dashboards +docker run --rm --net="host" {dockerimage} setup --dashboards ---- // end::docker[] @@ -45,4 +45,4 @@ and run: ---- PS > .{backslash}{beatname_lc}.exe setup --dashboards ---- -// end::win[] \ No newline at end of file +// end::win[] diff --git a/libbeat/docs/tab-widgets/load-index-template.asciidoc b/libbeat/docs/tab-widgets/load-index-template.asciidoc index c28544532c0..40914f378f1 100644 --- a/libbeat/docs/tab-widgets/load-index-template.asciidoc +++ b/libbeat/docs/tab-widgets/load-index-template.asciidoc @@ -29,7 +29,7 @@ // tag::docker[] ["source","sh",subs="attributes"] ---- -docker run --net="host" {dockerimage} setup --index-management +docker run --rm --net="host" {dockerimage} setup --index-management ---- // end::docker[] @@ -45,4 +45,4 @@ and run: ---- PS > .{backslash}{beatname_lc}.exe setup --index-management ---- -// end::win[] \ No newline at end of file +// end::win[]