-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
38 lines (31 loc) · 892 Bytes
/
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
35
36
37
38
# How to use it
# =============
#
# Visit http://blog.zedroot.org/using-docker-to-maintain-a-ruby-gem/
# ~~~~ Image base ~~~~
# Base image with the latest Ruby only
FROM ruby:2.3.0-slim
MAINTAINER Guillaume Hain zedtux@zedroot.org
# ~~~~ Set up the environment ~~~~
ENV DEBIAN_FRONTEND noninteractive
RUN mkdir -p /gem/
WORKDIR /gem/
ADD . /gem/
# ~~~~ OS Maintenance & Rails Preparation ~~~~
# Rubygems and Bundler
RUN apt-get update && \
apt-get install -y git build-essential unzip && \
touch ~/.gemrc && \
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc && \
gem install rubygems-update && \
update_rubygems && \
gem install bundler && \
bundle install && \
apt-get remove --purge -y build-essential && \
apt-get autoremove -y && \
apt-get autoclean -y && \
apt-get clean
# Import the gem source code
VOLUME .:/gem/
ENTRYPOINT ["bundle", "exec"]
CMD ["rake", "-T"]