Docker images for Err, a chat-bot designed to be easily deployable, extensible and maintainable.
- python3pypi: A Ubuntu 15.04 image with Python 3 and the latest stable release of Err from PyPI.
- python3master: A Ubuntu 15.04 image with Python 3 and the latest development snapshot of Err from GitHub (master).
- python2pypi: A Ubuntu 15.04 image with Python 2 and the latest stable release of Err from PyPI.
- python2master: A Ubuntu 15.04 image with Python 2 and the latest development snapshot of Err from GitHub (master).
This container can be started in three different modes:
- shell: Start a bash session as the bot account (err).
- rootshell: Start a bash session as the root account.
- err: Start the bot itself. Any additional arguments passed here will be passed on to
For example, try:
docker run --rm -it errbot/err:python3pypi err --help
To successfully run the bot, you will have to mount a config.py into the
/err/ directory (
--volume option to docker run).
Inside the container,
/err/data/ has already been set aside for data storage. You should mount this directory as a data volume as well in order to de-couple your bot data from the container itself.
Some plugins require additional dependencies that may not be installed in the virtualenv by default. There are three ways to deal with this, listed from best practice to worst:
- Build your own image. Write a
FROM errbot/err:python3pypi(or one of the other available tags in place of python3pypi) and install dependencies as part of the container build process with
RUN runas err /err/virtualenv/bin/pip install somepkg.
- Let Err install dependencies automatically by setting
AUTOINSTALL_DEPS = Truein
- Enter a running container manually (
docker exec --interactive --tty <container-name> /bin/sh -c "TERM=$TERM exec /bin/bash --login"where
<container-name>is the name listed by
docker ps) and install with pip as in step 2 above (
runas err /err/virtualenv/bin/pip install somepkg).
/err: Home directory of the user account for Err.
config.pyis expected to go here.
.sshdirectory of the bot user (you can mount private SSH keys into this directory if you need to install plugins from private repositories).
/err/virtualenv/: The virtualenv containing the Python interpreter and installed packages.
/err/data/: A volume intended to store bot data (
- The bot is run under its own user account (err), not as root.
- SSH is set up to automatically add unknown host keys (StrictHostKeyChecking no).
There seems to be a problem with the
$ sudo docker run --rm -it errbot/err:python3pypi err --help sudo: /err/virtualenv/bin/err.py: command not found