Sha256: 0a30366c4993fe887ba54e824ba3a3c5105fbd879ddb27c28dfe7f2a829fdf56

Contents?: true

Size: 1.67 KB

Versions: 4

Compression:

Stored size: 1.67 KB

Contents

# Ubuntu base image
FROM ubuntu

# Install rbenv deps
RUN apt-get update
RUN apt-get install -y build-essential zlib1g-dev libssl-dev openssl libreadline-dev sqlite3 libsqlite3-dev libxslt-dev libxml2-dev curl wget git-core

# Install rbenv
RUN git clone https://github.com/sstephenson/rbenv.git /.rbenv
RUN echo 'export PATH="/.rbenv/bin:$PATH"' >> /etc/profile
RUN echo 'export RBENV_ROOT="/.rbenv"'     >> /etc/profile
RUN echo 'eval "$(rbenv init -)"'          >> /etc/profile
RUN echo 'gem: --no-rdoc --no-ri'          >> /etc/gemrc

# Install rbenv build plugin
RUN mkdir -p /.rbenv/plugins
RUN git clone https://github.com/sstephenson/ruby-build.git /.rbenv/plugins/ruby-build

# Install specified ruby version
RUN /bin/bash -l -c 'RUBY_CONFIGURE_OPTS="--disable-install-doc" rbenv install {{ruby_version}}'
RUN /bin/bash -l -c 'rbenv global {{ruby_version}}'
RUN /bin/bash -l -c 'gem install bundler'
RUN /bin/bash -l -c 'rbenv rehash'

# Create a user to run as.
RUN adduser --no-create-home --disabled-password --gecos "" --shell /bin/false hoosegow

###########################################################################################
# Anything added after the ADD command will not be cached. Try to add changes above here. #
###########################################################################################

# Add this directory to /
ADD . /hoosegow
RUN chown -R hoosegow:hoosegow /hoosegow

# Switch to limited user now.
USER hoosegow

# Run all commands in /hoosegow
WORKDIR /hoosegow

# Bundle hoosegow
RUN /bin/bash -l -c 'BUNDLE_JOBS=4 bundle install --path .bundle --without development test'

# Command to run when `docker run hoosegow`
ENTRYPOINT /bin/bash -l -c bin/hoosegow

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hoosegow-1.2.3 Dockerfile
hoosegow-1.2.2 Dockerfile
hoosegow-1.2.1 Dockerfile
hoosegow-1.2.0 Dockerfile