# Build using prebuilt configuration

Use this option when you want to build from a prebuilt WProofreader base image.

It does not require an installation package. The Dockerfile pulls the base image from Docker Hub.

### What you need

* Docker installed.
* The prebuilt Dockerfile: [Dockerfile.ubuntu-prebuilt](https://github.com/WebSpellChecker/wproofreader-docker/blob/master/Dockerfile.ubuntu-prebuilt)
* Access to Docker Hub to pull the base image during `docker build`.

### Build the image

#### Required build arguments

* `TAG`: the base image tag. It must include the `-base` suffix. Example: "<code class="expression">space.vars.current\_version</code>-base".

{% hint style="info" %}
The list of available tags is on [Docker Hub](https://hub.docker.com/r/webspellchecker/wproofreader/tags).
{% endhint %}

* `WPR_LICENSE_TICKET_ID`: activates the license during the build.
* `WPR_LANGUAGES`: comma-separated locales.
* `WPR_AI_MODELS`: comma-separated AI model IDs.
* `WPR_PROTOCOL`: `1` (HTTPS) or `2` (HTTP).
* `WPR_VIRTUAL_DIR`: virtual directory name.

{% hint style="info" %}
Default value of `WPR_VIRTUAL_DIR` is `wscservice`. Set it to `/` to serve from the root path.
{% endhint %}

Example:

<pre class="language-bash"><code class="lang-bash">docker build -t local/wsc_app \
  --build-arg TAG=base \
  --build-arg WPR_LICENSE_TICKET_ID=<a data-footnote-ref href="#user-content-fn-1">&#x3C;license_ticket></a> \
  --build-arg WPR_LANGUAGES=en_US,en_GB,en_CA,en_AU \
  --build-arg WPR_AI_MODELS=1,2 \
  --build-arg WPR_PROTOCOL=2 \
  --build-arg WPR_VIRTUAL_DIR=wscservice \
  -f Dockerfile.ubuntu-prebuilt .
</code></pre>

{% hint style="info" %}
For language short codes, see [Supported languages](https://docs.webspellchecker.com/display/WebSpellCheckerServer55x/Supported+languages).
{% endhint %}

Use `--env` at runtime.

These runtime values override the value used during the image build:

* `WPR_PROTOCOL`
* `WPR_WEB_PORT`
* `WPR_VIRTUAL_DIR`

Full list of runtime options is in the [README](https://github.com/WebSpellChecker/wproofreader-docker#create-and-run-docker-container).

```bash
docker run -d \
  -p 80:8080 \
  --env WPR_PROTOCOL=2 \
  --env WPR_WEB_PORT=80 \
  --env WPR_VIRTUAL_DIR=wscservice \
  local/wsc_app
```

#### Mount dictionaries and certificates

Mounts are optional. Use them for persistence and for HTTPS.

**Persist dictionaries and style guide**

Mount `/dictionaries` to persist shared data outside the container.

It stores:

* User custom dictionaries
* Organization custom dictionaries
* Style Guide data

Use this mount if you:

* recreate containers and need the data to survive
* run several containers and want them to use shared resources

Example:

```bash
docker run -d \
  -p 80:8080 \
  -v /path/on/host/dictionaries:/dictionaries \
  local/wsc_app
```

**Use your own TLS certificate**

Mount `/certificate` and provide these files:

* `cert.pem`
* `key.pem`

Example (HTTPS):

```bash
docker run -d \
  -p 443:8443 \
  -v /path/on/host/certificate:/certificate \
  --env WPR_PROTOCOL=1 \
  --env WPR_WEB_PORT=443 \
  local/wsc_app
```

The two common endpoints are:

{% tabs %}
{% tab title="WPR\_VIRTUAL\_DIR=wscservice" %}

* Version: `http(s)://<host>/wscservice/api?cmd=ver`
* Status: `http(s)://<host>/wscservice/api?cmd=status`
  {% endtab %}

{% tab title="WPR\_VIRTUAL\_DIR=/" %}

* Version: `http(s)://<host>/api?cmd=ver`
* Status: `http(s)://<host>/api?cmd=status`
  {% endtab %}
  {% endtabs %}

Use the checks from the [README](https://github.com/WebSpellChecker/wproofreader-docker#verify-work).

* Health and license time:
  * [Health check](/v6.12.0/api-reference/auxiliary-api-commands/health-check.md)
* Log-based license validation:
  * [License verification](/v6.12.0/deployment/licensing/license-verification.md)

### Next steps

* If the target host has no Internet access, continue with [Build without internet connection](/v6.12.0/deployment/installation/docker/build-without-internet-connection.md).
* Container options and verification are in the upstream [README](https://github.com/WebSpellChecker/wproofreader-docker/blob/master/README.md).

[^1]: Insert your license ticket here.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wproofreader.com/v6.12.0/deployment/installation/docker/build-using-prebuilt-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
