Skip to content

Instantly share code, notes, and snippets.

@sirhopcount
Created December 10, 2014 19:15
Show Gist options
  • Save sirhopcount/7303c97edfa7cccd8afa to your computer and use it in GitHub Desktop.
Save sirhopcount/7303c97edfa7cccd8afa to your computer and use it in GitHub Desktop.
docker + lita problem
Run lita+docker interactively:
$ sudo docker run -ti --link lita_redis:litadb sirhopcount/lita
Type "exit" or "quit" to end the session.
Lita > quit
Run it as daemon:
$ sudo docker run -d --link lita_redis:litadb sirhopcount/lita
ae2d7dfbf6a0623e1fbb6bc060b1759adcefe00ac458b8eeb83b51da9e180d72
But no running instance:
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
feb403712752 sirhopcount/redis:latest "/usr/local/bin/redi 2 hours ago Up 2 hours 6379/tcp lita_redis
$ sudo docker ps --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ae2d7dfbf6a0 sirhopcount/lita:latest "bundle exec lita" 20 seconds ago Exited (0) 18 seconds ago compassionate_darwin
0c91485e088f sirhopcount/lita:latest "bundle exec lita" 29 seconds ago Exited (0) 24 seconds ago boring_newton
feb403712752 sirhopcount/redis:latest "/usr/local/bin/redi 2 hours ago Up 2 hours 6379/tcp lita_redis
Logs:
$ sudo docker logs ae2d7dfbf6a0
Type "exit" or "quit" to end the session.
stty: standard input: Inappropriate ioctl for device
Lita >
FROM sirhopcount/ruby2
MAINTAINER Adrian van Dongen [email protected]
ENV REFRESHED_AT 2014-12-10
## Disable HTTPS because of SSL problems, see:
## http://stackoverflow.com/questions/27285185/could-not-find-valid-gem-certificate-verify-failed
RUN echo 'gem: --clear-sources --source=http://rubygems.org/' > /usr/local/etc/gemrc
## Install lita and create workdir.
RUN gem install bundle \
&& mkdir /opt/lita
## Copy Gemfile and lita configuration file to workdir.
COPY Gemfile /opt/lita/Gemfile
COPY lita_config.rb /opt/lita/lita_config.rb
## Set up workdir.
WORKDIR /opt/lita/
## Install and execute lita
RUN bundle install
## bundle exec all the things
ENTRYPOINT [ "bundle", "exec" ]
CMD [ "lita" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment