This is a Docker configuration that you can use to build a WProofreader image.
Note! You can also use a Docker image with WProofreader Server that we built and published on Doker Hub.
To create and use a custom Docker image with WProofreader Server:
- Clone WProofreader Docker repo.
- Copy the WebSpellChecker/WProofreader installation package (e.g.
- If needed, adjust the default installation options by modifying the
wproofreader-docker/files/config.inifile. For details on the available options, refer to Automated Installing WebSpellChecker on Linux guide.
- Build a Docker image using the command below:
docker build -t webspellchecker/wproofreader <path_to_Dockerfile_directory>
-tassign a tag name
<path_to_Dockerfile_directory>the path to a Dockerfile directory (not to Dockerfile itself). If a Dockerfile is in the same directory, e.g.
/wproofreader-docker/, you need to use to use
.instead of the path.
docker build -t webspellchecker/wproofreader .
- Create and run a Docker container from the latest Docker image with the following options:
docker run --mac-address="12:34:d7:b0:6b:61" -d -p 80:80 -p 2880:2880 webspellchecker/wproofreader <license_ticket_id> <your_host_name>
To use global custom and user dictionaries your need to share a directory for the dictionaries with the Docker container. To do so, run a container as follows:
docker run --mac-address="12:34:d7:b0:6b:61" -d -p 80:80 -p 2880:2880 -v <your_directory_path>:/dictionaries webspellchecker/wproofreader <license_ticket_id> <your_host_name>
--mac-address="12:34:d7:b0:6b:61"predefine a MAC address of Docker container to ensure the correct licensing process.
-dstart a container in detached mode.
-p 2880:2880map the host port and the exposed port of container, where port 80 is a web server port and 2880 is the service port.
-v <shared_dictionaries_directory>:/dictionariesmount a shared directory where personal user and global custom dictionaries will be created and stored. This is required to save the dictionaries between starts of containers.
webspellchecker/wproofreaderthe latest tag of WProofreader Server Docker image.
license_ticket_idyour license ticket ID.
your_host_namethe name of a host name that will be used for setup of demo samples with WProofreader. This is an optional parameter, and if nothing is specified,
localhostwill be used (e.g. http://localhost/wscservice/samples/).
Working with Container
- Going further if you need to restart the service or container, you should use Docker start or stop commands with a container Id as an option.
docker start <container_id>
- If you are creating a new container (upgrade the version, migrate to another server, etc.), you must deactivate a license first. Otherwise, it will be broken.
To deactive the license propely, the following steps are required:
- Connect to a container where WProofreader is running using
docker exec -it <container_id> bash
- Deactivate a license following the steps described in the manual.
After that you can use your license safely with a new container. The steps how to start a new container are described above.
Once a docker container with WProofreader is up and running, you need to integrate it into your web app.