Replace dictionary in container
This guide shows how to replace a Hunspell dictionary in a Docker container and then create an image from the modified container. It is intended for users who are familiar with basic Docker commands.
Connect to your machine with a running container. Ensure you are connected to the machine where your Docker container is running.
Upload the dictionary files to the container. Use the following commands to upload your updated Hunspell files to the container:
docker cp en_US.aff <container_id>:/en_US.aff docker cp en_US.dic <container_id>:/en_US.dicReplace the dictionary files. Access your container and replace the existing dictionary files.
docker exec -it <container_id> /bin/bashThe Hunspell files are stored here:
/var/lib/WebSpellChecker/Resources/Hunspell/en/
Replace
en_US.affanden_US.dic:mv /en_US.aff /var/lib/WebSpellChecker/Resources/Hunspell/en/en_US.aff mv /en_US.dic /var/lib/WebSpellChecker/Resources/Hunspell/en/en_US.dicCreate an image of the container. After making the changes, create an image of your container:
docker commit <container_id>For a more detailed workflow, see how to create an image from modified container.
Verify the new image. Confirm the creation of the new image. Look for the image in the list with a recent creation time.
docker images(Optional) Tag the new image. Optionally, you can tag the new image for easier identification:
docker tag <image_id> image_with_new_hunspell_dict
Replace container_id and image_id with your specific container and image IDs.
Was this helpful?

