> For the complete documentation index, see [llms.txt](https://docs.wproofreader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wproofreader.com/v6.10.0.0/deployment/installation/docker/build-using-dockerfile.md).

# Build using Dockerfile

Use this option when you have an installation package (`wsc_app_*.tar.gz`).

This build creates a custom image. It does not depend on Docker Hub base tags.

### What you need

* Docker installed.
* The `wproofreader-docker` repository version that matches your package version.
* An installation package from support, for example: `wsc_app_x64_6.x.x.x_xx.tar.gz`.

{% hint style="info" %}
Keep the package version and the `wproofreader-docker` release version aligned. The Dockerfile and installer scripts can change between versions.
{% endhint %}

### Prepare the build context

1. Download the `wproofreader-docker` release that matches your package.
2. Put the package into the repo’s `files/` directory.
3. (Optional) Put SSL files into `files/certificate/` as:
   * `cert.pem`
   * `key.pem`

### Build the image

#### Common build arguments

* `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_DOMAIN_NAME`: hostname used by samples.
* `WPR_VIRTUAL_DIR`: virtual directory name.

Example:

```bash
docker build -t local/wsc_app \
  --build-arg WPR_LICENSE_TICKET_ID=<license_ticket> \
  --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_DOMAIN_NAME=localhost \
  --build-arg WPR_VIRTUAL_DIR=wscservice \
  -f Dockerfile .
```

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

### Run the container

Use `--env` at runtime. This lets you keep one image and change settings per environment.

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

Example (HTTP):

```bash
docker run -d \
  -p 80:8080 \
  --env WPR_PROTOCOL=2 \
  --env WPR_DOMAIN_NAME=localhost \
  --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
```

### Verify work

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

The two common endpoints are:

* Version: `http(s)://<host>/<virtual_dir>/api?cmd=ver`
* Status: `http(s)://<host>/<virtual_dir>/api?cmd=status`

### Next steps

* If the target host has no Internet access, continue with [Build without internet connection](/v6.10.0.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).
