forked from cequel/cequel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (20 loc) · 863 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
FROM ruby:alpine
# Put the basic system setup in a layer of its own so we don't have
# rebuild it all the time.
RUN apk add --update build-base tzdata bash bash-completion git \
&& rm -rf /var/cache/apk/*
WORKDIR /cequel
# Make it nicer to run tests.. now "ber" instead of "bundle exec rspec" and "bi" instead of "bundle install"
RUN echo 'alias be="bundle exec"' >> ~/.bashrc \
&& echo 'alias ber="bundle exec rspec"' >> ~/.bashrc \
&& echo 'alias bi="bundle install"' >> ~/.bashrc
# Put the bundle in a layer of its own. The bundle doesn't change
# that often to copy just the Gemfiles and bundle to build a layer
# that rarely changes
COPY ./Gemfile* /cequel/
COPY ./cequel.gemspec /cequel/
RUN mkdir -p /cequel/lib/cequel/
COPY ./lib/cequel/version.rb /cequel/lib/cequel/
RUN gem install bundler \
&& bundle install
COPY ./* /cequel/