Since 4.6 the Docker image available from https://hub.docker.com/r/atlassian/bitbucket-server/ ends up starting both Bitbucket Server itself but additionally the bundled Elasticsearch instance.
This is undesirable as it prevents the Docker image from being able to be used for production deployments (where only the actual instance should be running) and in particular for data center deployments as a local Elasticsearch will not be useful in that scenario.
https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ contains:
Run only one process per container
In almost all cases, you should only run a single process in a single container. Decoupling applications into multiple containers makes it much easier to scale horizontally and reuse containers. If that service depends on another service, make use of container linking.
Which pretty much sums this up.
The advantage of the current situation is that search just works out of the box without any further configuration.
Instead of relying on the bundled instance we should either:
- Document how to run and link a Bitbucket Server and the Elasticsearch container.
- Provide a docker compose file that runs both correctly configured.
This would re-enable the use of the Docker image for production deployments as it will avoid running another process inside the container.
Other options that retain the current behaviour might include the usage of environment variables to enable/disable running the bundled Elasticsearch instance.
- mentioned in
-
Page Failed to load
This was done as part of https://bitbucket.org/atlassian/docker-atlassian-bitbucket-server/pull-requests/27/disable-elasticsearch-on-startup/diff