<commit_before># Docker W3C/HTML5 validator instance
Dockerfile for the creation of a self contained W3C Markup validator (with HTML5 validation) instance for fast/offline validation of authored HTML documents.

Setup of such a configuration can be tricky and a little messy so having all this in an isolated and automated way seemed like a good idea.

## Building
To build the Docker image, run the following:

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

This will take some time (lots to download), performing the following tasks:
- Install Ubuntu base (14.04.2 LTS), Apache HTTP server, OpenJDK 7, [supervisord](http://supervisord.org/) and a few others.
- Download latest W3C validator source and [Validator.nu](http://validator.github.io/validator/) `vnu.jar` portable HTML5 validator jar.
- Configure Perl/CPAN.
- Install and configure W3C validator (including Validator.nu setup).
- Start Apache and Validator.nu under `supervisord`.

That's the boring/messy stuff out of the way - your new Docker image should now be built.

Alternatively you can pull this image directly from the Docker Hub Registry:

```sh
$ sudo docker pull magnetikonline/html5validator
```

## Running
To start the image, run the following:

```sh
$ ./run.sh
```

This will start the image in a new backgrounded container, exposing the following ports:
- Port `80` (Apache2) to host machine on port `8080`.<commit_msg>No more sudo in README.md<commit_after># Docker W3C/HTML5 validator instance
Dockerfile for the creation of a self contained W3C Markup validator (with HTML5 validation) instance for fast/offline validation of authored HTML documents.

Setup of such a configuration can be tricky and a little messy so having all this in an isolated and automated way seemed like a good idea.

## Building
To build the Docker image, run the following:

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

This will take some time (lots to download), performing the following tasks:
- Install Ubuntu base (14.04.2 LTS), Apache HTTP server, OpenJDK 7, [supervisord](http://supervisord.org/) and a few others.
- Download latest W3C validator source and [Validator.nu](http://validator.github.io/validator/) `vnu.jar` portable HTML5 validator jar.
- Configure Perl/CPAN.
- Install and configure W3C validator (including Validator.nu setup).
- Start Apache and Validator.nu under `supervisord`.

That's the boring/messy stuff out of the way - your new Docker image should now be built.

Alternatively you can pull this image directly from the Docker Hub Registry:

```sh
$ docker pull magnetikonline/html5validator
```

## Running
To start the image, run the following:

```sh
$ ./run.sh
```

This will start the image in a new backgrounded container, exposing the following ports:
- Port `80` (Apache2) to host machine on port `8080`.
{'fraction_non_alphanumeric': 0.08215707564241766, 'fraction_numerical': 0.01520086862106406, 'mean_word_length': 4.409001956947162, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6825738', 'n_tokens_mistral': 819, 'n_tokens_neox': 758, 'n_words': 374}