# Build without internet connection

Use this workflow if the production host has no Internet access.

Build (or pull) the Docker image on a machine with Internet access. Then transfer it to the isolated host.

### What you need

* Docker installed on the build machine and the production host.
* An image already built locally.

### Save the image to a tar archive

```bash
docker save -o wsc_app.tar local/wsc_app
```

### Transfer the tar file to the production host

Use `scp` (or `rsync`) over SSH:

```bash
scp wsc_app.tar REMOTE_USER@xx.xx.xx.xx:/path/on/remote
```

### Load the image on the production host

```bash
docker load -i /path/on/remote/wsc_app.tar
```

### Run the container on the production host

Use `--env` flags.

This avoids rebuilding images for environment-specific values.

Runtime values also override values baked into the image during `docker build`.

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

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

{% endtab %}

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

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

{% endtab %}
{% endtabs %}

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)


---

# 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-without-internet-connection.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.
