rroemhild / docker-errbot Goto Github PK
View Code? Open in Web Editor NEWDockerfile for Err - the pluggable chatbot
License: MIT License
Dockerfile for Err - the pluggable chatbot
License: MIT License
Although HipChat is on its way out, there are still a few of us using it in corporate settings until we can get it removed and replaced with Slack.
With that in mind, the current version of the image won't connect to our HipChat server, see errbotio/errbot#1144 for details of others with the same issue.
Specifying specific pip packages in requirements.yml
fixes the issue:
sleekxmpp==1.3.2
pyasn1==0.3.7
pyasn1-modules==0.1.5
On Docker hub, in "Build settings", section "Repository Links" (or here), you could add a link to 'debian', to automatically trigger a rebuild of your image every time there is an update of the debian image.
Thanks!
Hi All,
When using the environment variable BOT_PORT the start process failed with this error :
14:15:43 DEBUG errbot.backends.irc Trigger shutdown
14:15:43 DEBUG errbot.storage Closed storage 'irc_backend'
14:15:43 INFO errbot.plugin_manager Shutdown.
14:15:43 DEBUG errbot.storage Closed storage 'core'
14:15:43 INFO errbot.plugin_manager Bye.
14:15:43 DEBUG errbot.storage Closed storage 'repomgr'
Traceback (most recent call last):
File "/app/venv/bin/errbot", line 11, in <module>
load_entry_point('errbot==5.2.0', 'console_scripts', 'errbot')()
File "/app/venv/lib/python3.5/site-packages/errbot/cli.py", line 297, in main
bootstrap(backend, root_logger, config, restore)
File "/app/venv/lib/python3.5/site-packages/errbot/bootstrap.py", line 240, in bootstrap
bot.serve_forever()
File "/app/venv/lib/python3.5/site-packages/errbot/backends/irc.py", line 711, in serve_forever
self.conn.start()
File "/app/venv/lib/python3.5/site-packages/irc/bot.py", line 339, in start
self._connect()
File "/app/venv/lib/python3.5/site-packages/irc/bot.py", line 188, in _connect
**self.__connect_params)
File "/app/venv/lib/python3.5/site-packages/errbot/backends/irc.py", line 369, in connect
self.connection.connect(*args, connect_factory=connection_factory, **kwargs)
File "/app/venv/lib/python3.5/site-packages/jaraco/functools.py", line 458, in wrapper
return method(self, *args, **kwargs)
File "/app/venv/lib/python3.5/site-packages/irc/client.py", line 198, in connect
self.socket = self.connect_factory(self.server_address)
File "/app/venv/lib/python3.5/site-packages/irc/connection.py", line 51, in connect
sock.connect(server_address)
File "/usr/lib/python3.5/ssl.py", line 1027, in connect
self._real_connect(addr, False)
File "/usr/lib/python3.5/ssl.py", line 1014, in _real_connect
socket.connect(self, addr)
TypeError: an integer is required (got type str)
I checked config.py used within the project and noticed that the port variable is not casted to an int
# port
if 'BOT_PORT' in os.environ:
BOT_IDENTITY['port'] = os.environ['BOT_PORT']
I checked the entry (when server:port) is specified, the cast is applied
# server
if 'BOT_SERVER' in os.environ:
if ':' in os.environ['BOT_SERVER']:
server, port = os.environ['BOT_SERVER'].split(':')
BOT_IDENTITY['server'] = (server, int(port))
else:
BOT_IDENTITY['server'] = os.environ['BOT_SERVER']
Kind Regards
I started this docker container, without setting BOT_ALT_PREFIXES
. The config.py defaulted to the name 'Err', while my bot name on slack was mybot
, and this caused the connection to slack to fail.
In your requirements.txt
, you hardcoded the version of errbot
to 4.1.3
.
Is there a reason for doing so?
If not, would you mind removing the version, or at least hardcode a newer one? (The most up to date is 4.3.3
.)
Hi there... is this image depreciated? Looks pretty outdated, but linked to from the documentation.
I'm not sure where else to go, i've been fighting this all day.
If I put python-jenkins
in a plugin requirements.txt
it fails to install.
If i do it manually it fails:
dir=$(pwd)
docker run \
--name err -it \
-e BACKEND=Text \
-e ERRCONF=/srv/docker/config.py \
-v $dir:/srv \
rroemhild/errbot /bin/bash
with this output:
18:35:14 INFO errbot.cli Config check passed...
18:35:14 INFO errbot.cli Selected backend 'Text'.
18:35:14 INFO errbot.cli Checking for '/srv/data'...
18:35:14 INFO errbot.specific_plugin_ma storage search paths {'/app/venv/lib/python3.4/site-packages/errbot/storage'}
18:35:14 INFO errbot.specific_plugin_ma Found those plugings available:
18:35:14 INFO errbot.specific_plugin_ma Memory (/app/venv/lib/python3.4/site-packages/errbot/storage/memory.py)
18:35:14 INFO errbot.specific_plugin_ma Shelf (/app/venv/lib/python3.4/site-packages/errbot/storage/shelf.py)
18:35:14 INFO errbot.bootstrap Found Storage plugin: 'Shelf'
Description: This is the storage plugin for the traditional shelf store for errbot.
18:35:14 WARNING yapsy Plugin candidate '/app/venv/lib/python3.4/site-packages/errbot/storage/memory.plug' rejected by strategy 'SpecificBackendLocator'
18:35:14 INFO errbot.specific_plugin_ma backends search paths {'/app/venv/lib/python3.4/site-packages/errbot/backends'}
18:35:14 INFO errbot.specific_plugin_ma Found those plugings available:
18:35:14 INFO errbot.specific_plugin_ma Telegram (/app/venv/lib/python3.4/site-packages/errbot/backends/telegram_messenger.py)
18:35:14 INFO errbot.specific_plugin_ma IRC (/app/venv/lib/python3.4/site-packages/errbot/backends/irc.py)
18:35:14 INFO errbot.specific_plugin_ma Hipchat (/app/venv/lib/python3.4/site-packages/errbot/backends/hipchat.py)
18:35:14 INFO errbot.specific_plugin_ma Null (/app/venv/lib/python3.4/site-packages/errbot/backends/null.py)
18:35:14 INFO errbot.specific_plugin_ma Graphic (/app/venv/lib/python3.4/site-packages/errbot/backends/graphic.py)
18:35:14 INFO errbot.specific_plugin_ma Test (/app/venv/lib/python3.4/site-packages/errbot/backends/test.py)
18:35:14 INFO errbot.specific_plugin_ma Slack (/app/venv/lib/python3.4/site-packages/errbot/backends/slack.py)
18:35:14 INFO errbot.specific_plugin_ma Text (/app/venv/lib/python3.4/site-packages/errbot/backends/text.py)
18:35:14 INFO errbot.specific_plugin_ma XMPP (/app/venv/lib/python3.4/site-packages/errbot/backends/xmpp.py)
18:35:14 INFO errbot.bootstrap Found Backend plugin: 'Text'
Description: This is the text backend for Err.
18:35:14 WARNING yapsy Plugin candidate '/app/venv/lib/python3.4/site-packages/errbot/backends/telegram_messenger.plug' rejected by strategy 'SpecificBackendLocator'
18:35:14 WARNING yapsy Plugin candidate '/app/venv/lib/python3.4/site-packages/errbot/backends/irc.plug' rejected by strategy 'SpecificBackendLocator'
18:35:14 WARNING yapsy Plugin candidate '/app/venv/lib/python3.4/site-packages/errbot/backends/hipchat.plug' rejected by strategy 'SpecificBackendLocator'
18:35:14 WARNING yapsy Plugin candidate '/app/venv/lib/python3.4/site-packages/errbot/backends/null.plug' rejected by strategy 'SpecificBackendLocator'
18:35:14 WARNING yapsy Plugin candidate '/app/venv/lib/python3.4/site-packages/errbot/backends/graphic.plug' rejected by strategy 'SpecificBackendLocator'
18:35:14 WARNING yapsy Plugin candidate '/app/venv/lib/python3.4/site-packages/errbot/backends/test.plug' rejected by strategy 'SpecificBackendLocator'
18:35:14 WARNING yapsy Plugin candidate '/app/venv/lib/python3.4/site-packages/errbot/backends/slack.plug' rejected by strategy 'SpecificBackendLocator'
18:35:14 WARNING yapsy Plugin candidate '/app/venv/lib/python3.4/site-packages/errbot/backends/xmpp.plug' rejected by strategy 'SpecificBackendLocator'
18:35:14 INFO errbot.plugin_manager Installing packages from './plugins/CI/requirements.txt'.
Collecting python-jenkins==0.4.13 (from -r ./plugins/CI/requirements.txt (line 1))
Using cached python-jenkins-0.4.13.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-fbtsdhh9/pbr-1.10.0/setup.py", line 22, in <module>
File "/tmp/easy_install-fbtsdhh9/pbr-1.10.0/pbr/util.py", line 264, in cfg_to_args
File "/tmp/easy_install-fbtsdhh9/pbr-1.10.0/pbr/util.py", line 566, in wrap_commands
File "/app/venv/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2264, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named 'release'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-nloi_0yi/python-jenkins/setup.py", line 5, in <module>
pbr=True)
File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/app/venv/lib/python3.4/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/app/venv/lib/python3.4/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/app/venv/lib/python3.4/site-packages/pkg_resources/__init__.py", line 851, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/app/venv/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1123, in best_match
return self.obtain(req, installer)
File "/app/venv/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1135, in obtain
return installer(requirement)
File "/app/venv/lib/python3.4/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/app/venv/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 665, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/app/venv/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/app/venv/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 876, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/app/venv/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1115, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/app/venv/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1101, in run_setup
run_setup(setup_script, args)
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 249, in run_setup
raise
1 #!/bin/bash
File "/usr/lib/python3.4/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/lib/python3.4/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 168, in save_modules
saved_exc.resume()
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 143, in resume
six.reraise(type, exc, self._tb)
File "/app/venv/lib/python3.4/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/app/venv/lib/python3.4/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-fbtsdhh9/pbr-1.10.0/setup.py", line 22, in <module>
File "/tmp/easy_install-fbtsdhh9/pbr-1.10.0/pbr/util.py", line 264, in cfg_to_args
File "/tmp/easy_install-fbtsdhh9/pbr-1.10.0/pbr/util.py", line 566, in wrap_commands
File "/app/venv/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2264, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named 'release'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nloi_0yi/python-jenkins/
18:35:16 ERROR errbot.plugin_manager Failed to execute pip install for ./plugins/CI/requirements.txt.
Traceback (most recent call last):
File "/app/venv/lib/python3.4/site-packages/errbot/plugin_manager.py", line 61, in install_packages
subprocess.check_call(['pip', 'install', '--requirement', req_path])
File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['pip', 'install', '--requirement', './plugins/CI/requirements.txt']' returned non-zero exit status 1
18:35:16 INFO errbot webhooks: Flag to bind /echo to echo
18:35:17 ERROR errbot.bootstrap Some plugins failed to load:
<class 'subprocess.CalledProcessError'>: Command '['pip', 'install', '--requirement', './plugins/CI/requirements.txt']' returned non-zero exit status 1
File "/app/venv/lib/python3.4/site-packages/errbot/plugin_manager.py", line 61, in install_packages
subprocess.check_call(['pip', 'install', '--requirement', req_path])
File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
Some plugins failed to start during bot startup:
<class 'subprocess.CalledProcessError'>: Command '['pip', 'install', '--requirement', './plugins/CI/requirements.txt']' returned non-zero exit status 1
File "/app/venv/lib/python3.4/site-packages/errbot/plugin_manager.py", line 61, in install_packages
subprocess.check_call(['pip', 'install', '--requirement', req_path])
File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
If i clone this repo and add python-jenkins
to requirements.txt
and run docker build -t errbot:local .
it errors with:
Complete output from command /app/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-an7urk6o/python-jenkins/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_f7zglq6-record/install-record.txt --single-version-externally-managed --compile --install-headers /app/venv/include/site/python3.5/python-jenkins:
ERROR:root:Error parsing
Traceback (most recent call last):
File "/app/venv/lib/python3.5/site-packages/pbr/core.py", line 111, in pbr
attrs = util.cfg_to_args(path, dist.script_args)
File "/app/venv/lib/python3.5/site-packages/pbr/util.py", line 264, in cfg_to_args
wrap_commands(kwargs)
File "/app/venv/lib/python3.5/site-packages/pbr/util.py", line 566, in wrap_commands
cmdclass = ep.resolve()
File "/app/venv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2264, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named 'release'
error in setup command: Error parsing /tmp/pip-build-an7urk6o/python-jenkins/setup.cfg: ImportError: No module named 'release'
----------------------------------------
Command "/app/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-an7urk6o/python-jenkins/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_f7zglq6-record/install-record.txt --single-version-externally-managed --compile --install-headers /app/venv/include/site/python3.5/python-jenkins" failed with error code 1 in /tmp/pip-build-an7urk6o/python-jenkins/
The command '/bin/sh -c virtualenv --system-site-packages -p python3 /app/venv && /app/venv/bin/pip3 install --no-cache-dir -r /app/requirements.txt && /app/venv/bin/pip3 install --upgrade requests && /app/venv/bin/pip3 install --upgrade websocket-client' returned a non-zero code: 1
I can not figure out how to get this plugin to install
Ran:
mkdir /tmp/errbot /tmp/errbot/ssl /tmp/errbot/data /tmp/errbot/plugins /tmp/errbot/errbackends
chmod -R 755 /tmp/errbot
Then attempted to run:
docker run --name err -v /tmp/errbot:/srv -e BACKEND=Slack -e BOT_USERNAME=err -e BOT_ADMINS=@channel -e BOT_TOKEN=fgsdfgafg352XFlXRz -e "TZ=USA/Mountian" rroemhild/errbot
Error I am getting everytime.
mkdir: cannot create directory ‘/srv/data’: Permission denied
mkdir: cannot create directory ‘/srv/plugins’: Permission denied
mkdir: cannot create directory ‘/srv/errbackends’: Permission denied
Docker version 1.10.3, build 20f81dd running on osx 10.11.5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.