-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
34 lines (26 loc) · 1.34 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Use phusion/baseimage as base image. To make your builds reproducible, make
# sure you lock down to a specific version, not to `latest`!
# See https://github.com/phusion/baseimage-docker/blob/master/Changelog.md for
# a list of version numbers.
FROM phusion/baseimage:0.9.15
MAINTAINER Mike Fotinakis <[email protected]>
# Set correct environment variables.
ENV HOME /root
# Disable SSH, enabled by phusion/baseimage by default. We don't want to encourage SSH management
# because `docker exec` exists now. https://github.com/phusion/baseimage-docker#disabling-ssh
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
RUN apt-get update
RUN apt-get install -y --no-install-recommends git-core build-essential curl wget
# Install ruby-install to manage ruby versions.
WORKDIR /tmp
RUN wget -O ruby-install-0.5.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.5.0.tar.gz
RUN tar -xzvf ruby-install-0.5.0.tar.gz
RUN cd ruby-install-0.5.0/ && sudo make install
# Install ruby.
RUN ruby-install --md5 02b7da3bb06037c777ca52e1194efccb ruby 2.1.3
# Inject the installed ruby bin dir into $PATH so that non-login shells can find ruby.
ENV PATH $PATH:/opt/rubies/ruby-2.1.3/bin
# Clean up APT and /tmp when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*