<commit_before># Build Tool Docker Image

A Docker image capable defining a container capable of running the build tool and its high-level wrapper `course` must have both Python 2.7 and the JDK. Each of these exist as core images maintained by the Docker Team and available via Docker Hub ([here](https://hub.docker.com/_/python/) and [here](https://hub.docker.com/_/openjdk/)), however, as we require both, a custom image must be built.

In order to be able to use the images maintained by the Docker Team, a script
is included that merges the two images, `create_image.sh`. Alternatively, this
script will also build the image for you.

Note: You will need a recent version of Docker. Use the Community Edition
version available at <https://store.docker.com>:

* [Mac edition](https://store.docker.com/editions/community/docker-ce-desktop-mac)
* [Windows edition](https://store.docker.com/editions/community/docker-ce-desktop-windows)
* [Other editions](https://store.docker.com/search?offering=community&type=edition)

Download it, and install it. Then, run it at least once (e.g., on the Mac,
open `/Applications/Docker.app`), which will create the various command line
links you'll need.

## To Create the `Dockerfile` and Build the Image

```
$ ./create_image.sh build
```

## Updating with New Build Tools

When new build tools are released, you'll need to update your Docker
image. To do this, simply build the image again:

```
$ ./create_image.sh build
```

## To Use the Build Tool via Docker<commit_msg>Warn about using brew-installable Docker.<commit_after># Build Tool Docker Image

A Docker image capable defining a container capable of running the build tool
and its high-level wrapper `course` must have both Python 2.7 and the JDK.
Each of these exist as core images maintained by the Docker Team and available
via Docker Hub ([here](https://hub.docker.com/_/python/) and
[here](https://hub.docker.com/_/openjdk/)); however, as we require both, a
custom image must be built.

In order to be able to use the images maintained by the Docker Team, a script
is included that merges the two images, `create_image.sh`. Alternatively, this
script will also build the image for you.

## Install Docker

You will need a recent version of Docker. Use the Community Edition version
available at <https://store.docker.com>:

* [Mac edition](https://store.docker.com/editions/community/docker-ce-desktop-mac)
* [Windows edition](https://store.docker.com/editions/community/docker-ce-desktop-windows)
* [Other editions](https://store.docker.com/search?offering=community&type=edition)

Download it, and install it. Then, run it at least once (e.g., on the Mac,
open `/Applications/Docker.app`), which will create the various command line
links you'll need.

**WARNING**: On the Mac, do _not_ use the version of Docker that can be
installed via Homebrew. Some people have had problems with that version, and
we will not debug problems using the build tools in that environment. Use the
official Community Edition version, as noted above.

## To Create the `Dockerfile` and Build the Image

```
$ ./create_image.sh build
```

## Updating with New Build Tools

When new build tools are released, you'll need to update your Docker
image. To do this, simply build the image again:

```
$ ./create_image.sh build
```

## To Use the Build Tool via Docker
{'fraction_non_alphanumeric': 0.096090719188302, 'fraction_numerical': 0.001193673530289466, 'mean_word_length': 4.432739059967585, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, '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': '6225872', 'n_tokens_mistral': 976, 'n_tokens_neox': 905, 'n_words': 433}