Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention bind-mounting plugins dir in Docker docs #82622

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions docs/reference/setup/install/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ start the new node with the generated enrollment token.
--
.Generating enrollment tokens
****
The enrollment token is valid for 30 minutes. If you need to generate a
The enrollment token is valid for 30 minutes. If you need to generate a
new enrollment token, run the
<<create-enrollment-token,`elasticsearch-create-enrollment-token`>> tool on your
existing node. This tool is available in the {es} `bin` directory of the Docker
existing node. This tool is available in the {es} `bin` directory of the Docker
container.

For example, run the following command on the existing `es01` node to
Expand All @@ -151,7 +151,7 @@ docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollmen
--

. In the terminal where you started your first node, copy the generated
enrollment token for adding new {es} nodes.
enrollment token for adding new {es} nodes.

. On your new node, start {es} and include the generated enrollment token.
+
Expand Down Expand Up @@ -425,11 +425,17 @@ chmod g+rwx esdatadir
chgrp 0 esdatadir
--------------------------------------------

You can also run an {es} container using both a custom UID and GID. Unless you
bind-mount each of the `config`, `data` and `logs` directories, you must pass
the command line option `--group-add 0` to `docker run`. This ensures that the user
under which {es} is running is also a member of the `root` (GID 0) group inside the
container.
You can also run an {es} container using both a custom UID and GID. You
must ensure that file permissions will not prevent {es} from executing. You
have two options.
pugnascotia marked this conversation as resolved.
Show resolved Hide resolved

* Pass the `--group-add 0` command line options to `docker run`. This
pugnascotia marked this conversation as resolved.
Show resolved Hide resolved
ensures that the user under which {es} is running is also a member of the
`root` (GID 0) group inside the container.
* Alternatively, you must bind-mound the `config`, `data` and `logs`
pugnascotia marked this conversation as resolved.
Show resolved Hide resolved
directories. You must also bind-mount the `plugins` directory if you
intend to install plugins and prefer not to <<_c_customized_image, create a
custom Docker image>>.
pugnascotia marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move the bind-mounting bullet first? I imagine most admins are using Docker compose in production so I'm not sure if we want to highlight the docker run option first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm honestly not sure which option an admin would prefer, but I do suspect that people following the guide to get something up-and-running would be better off using the bind-mounts, so I've swapped the options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine most admins are using Docker compose in production so I'm not sure if we want to highlight the docker run option first.

FWIW, I don't think folks using our Docker images in production are using either of these options. They are likely using Kubernetes or some other orchestrator or config as code mechanism to deploy. That's just my intuition though.


===== Increase ulimits for nofile and nproc

Expand Down