<commit_before># What is Crate?

Crate is a new breed of database to serve today’s mammoth data needs.
Based on the familiar SQL syntax, Crate combines high availability, resiliency, and scalability
in a distributed design that allows you to query mountains of data in realtime, not batches.

We solve your data scaling problems and make administration a breeze.
**Easy to scale, simple to use.**


[Crate][3]

# Crate Data Dockerfile

This repository contains **Dockerfile** of [Crate Data][3] for [Docker][1]'s [automated build][2]
published to the public [Docker Hub Registry][4].


## Base Docker Image

- [java:][5]

## Installation

1. Install [Docker][1]

2. Download latest automated build from public [Docker Hub Registry][2]

        docker pull crate/crate:latest

   alternatively you can build an image from `Dockerfile`:

        docker build -t="crate/crate" github.com/crate/docker-crate

## How to use this image

    docker run -d -p 4200:4200 -p 4300:4300 crate/crate:latest

### Attach persistent data directory

    docker run -d -p 4200:4200 -p 4300:4300 -v <data-dir>:/data crate/crate

### Use custom Crate configuration

    docker run -d -p 4200:4200 -p 4300:4300 crate/crate crate -Des.config=/path/to/crate.yml

Any configuration settings may be specified upon startup using the `-D` option prefix.
For example, configuring the cluster name by using system properties will work this way::

    docker run -d -p 4200:4200 -p 4300:4300 crate/crate crate -Des.cluster.name=cluster

For further configuration options please refer to the [Configuration][6] section of the online documentation.

### Environment

To set environment variables for Crate Data you need to use the ``--env`` option when starting
the docker image.

For example, setting the heap size:

    docker run -d -p 4200:4200 -p 4300:4300 --env CRATE_HEAP_SIZE=32g crate/crate

## Multicast

Crate uses multicast for node discovery by default. However, Docker does only support multicast on the same
host. This means that nodes that are started on the same host will discover each other automatically,
but nodes that are started on different hosts need unicast enabled.

You can enable unicast in your custom ``crate.yml``. See also: [Using Crate Data in a Multi Node Setup][7].


# License

View [license information][8] for the software contained in this image.


# User Feedback

## Issues

If you have any problems with, or questions about this image,
please contact us through a [GitHub issue][9].

If you have any questions or suggestions we would be very happy to help you.
So, feel free to swing by our IRC channel `#crate` on [Freenode][10].

For further information and official contact please visit [https://crate.io][3].

## Contributing

You are very welcome to contribute features or fixes! Before we can accept any pull requests to Crate Data
we need you to agree to our [CLA][11]. For further information please refer to [CONTRIBUTING.rst][12].



[1]: https://www.docker.com
[2]: https://registry.hub.docker.com/u/crate/crate/<commit_msg>added publish_host setting for discovery in readme<commit_after># What is Crate?

Crate is a new breed of database to serve today’s mammoth data needs.
Based on the familiar SQL syntax, Crate combines high availability, resiliency, and scalability
in a distributed design that allows you to query mountains of data in realtime, not batches.

We solve your data scaling problems and make administration a breeze.
**Easy to scale, simple to use.**


[Crate][3]

# Crate Data Dockerfile

This repository contains **Dockerfile** of [Crate Data][3] for [Docker][1]'s [automated build][2]
published to the public [Docker Hub Registry][4].


## Base Docker Image

- [java:][5]

## Installation

1. Install [Docker][1]

2. Download latest automated build from public [Docker Hub Registry][2]

        docker pull crate/crate:latest

   alternatively you can build an image from `Dockerfile`:

        docker build -t="crate/crate" github.com/crate/docker-crate

## How to use this image

    docker run -d -p 4200:4200 -p 4300:4300 crate/crate:latest

### Attach persistent data directory

    docker run -d -p 4200:4200 -p 4300:4300 -v <data-dir>:/data crate/crate

### Use custom Crate configuration

    docker run -d -p 4200:4200 -p 4300:4300 crate/crate crate -Des.config=/path/to/crate.yml

Any configuration settings may be specified upon startup using the `-D` option prefix.
For example, configuring the cluster name by using system properties will work this way::

    docker run -d -p 4200:4200 -p 4300:4300 crate/crate crate -Des.cluster.name=cluster

For further configuration options please refer to the [Configuration][6] section of the online documentation.

### Environment

To set environment variables for Crate Data you need to use the ``--env`` option when starting
the docker image.

For example, setting the heap size:

    docker run -d -p 4200:4200 -p 4300:4300 --env CRATE_HEAP_SIZE=32g crate/crate

## Multicast

Crate uses multicast for node discovery by default. However, Docker does only support multicast on the same
host. This means that nodes that are started on the same host will discover each other automatically,
but nodes that are started on different hosts need unicast enabled.

You can enable unicast in your custom ``crate.yml``. See also: [Using Crate Data in a Multi Node Setup][7].

Due to its architecture, Crate publishes the host it runs on for discovery within the cluster. Since
the address of the host inside the docker container differs from the actual host the docker image is
running on, you need to tell Crate to publish the address of the docker host for discovery.

    docker run -d -p 4200:4200 -p 4300:4300 crate/crate crate -Des.network.publish_host=host1.example.com:

If you change the transport port from the default ``4300`` to something else, you also need to pass
the publish port to Crate.

    docker run -d -p 4200:4200 -p 4321:4300 crate/crate crate -Des.transport.publish_port=4321


# License

View [license information][8] for the software contained in this image.


# User Feedback

## Issues

If you have any problems with, or questions about this image,
please contact us through a [GitHub issue][9].

If you have any questions or suggestions we would be very happy to help you.
So, feel free to swing by our IRC channel `#crate` on [Freenode][10].

For further information and official contact please visit [https://crate.io][3].

## Contributing

You are very welcome to contribute features or fixes! Before we can accept any pull requests to Crate Data
we need you to agree to our [CLA][11]. For further information please refer to [CONTRIBUTING.rst][12].



[1]: https://www.docker.com
[2]: https://registry.hub.docker.com/u/crate/crate/
{'fraction_non_alphanumeric': 0.07948490230905861, 'fraction_numerical': 0.03715216104203671, 'mean_word_length': 4.084273890142964, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3123630', 'n_tokens_mistral': 2106, 'n_tokens_neox': 1899, 'n_words': 934}