Skip to content

Instantly share code, notes, and snippets.

@colinsurprenant
Last active August 29, 2015 13:57
Show Gist options
  • Save colinsurprenant/9485073 to your computer and use it in GitHub Desktop.
Save colinsurprenant/9485073 to your computer and use it in GitHub Desktop.
JRuby on Ubuntu 13.04 Dockerfile
FROM colinsurprenant/ubuntu-raring-amd64:latest
MAINTAINER Colin Surprenant <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update; apt-get upgrade -y; apt-get install -y git-core wget curl build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev libgdbm-dev libffi-dev libxml2-dev libxslt1-dev libncurses5-dev libfuse2
# Fake a fuse install for openjdk-7 - see https://github.com/dotcloud/docker/issues/514
RUN (cd /tmp ; apt-get download fuse; dpkg-deb -x fuse_* .; dpkg-deb -e fuse_*; rm fuse_*.deb; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst; dpkg-deb -b . /fuse.deb; dpkg -i /fuse.deb)
# install java, ant
RUN apt-get install -y openjdk-7-jdk ant
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
# set locale
RUN locale-gen en_US.UTF-8; update-locale en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN dpkg-reconfigure --frontend noninteractive locales
# install rbenv
RUN git clone https://github.com/sstephenson/rbenv /usr/local/rbenv; mkdir -p /usr/local/rbenv/plugins
ENV RBENV_ROOT /usr/local/rbenv
ENV PATH $RBENV_ROOT/shims:$RBENV_ROOT/bin:$PATH
# install rubies
RUN git clone https://github.com/sstephenson/ruby-build /usr/local/rbenv/plugins/ruby-build; rbenv install jruby-1.7.11; rbenv global jruby-1.7.11; gem install bundler --no-ri --no-rdoc; rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment