-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 849 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (29 loc) · 849 Bytes
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
39
FROM ruby:2.4
# ruby on rails
RUN apt-get update && \
apt-get install -y --no-install-recommends \
nodejs \
build-essential \
default-mysql-client \
gcc make wget \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /workdir
WORKDIR /workdir
ADD Gemfile /workdir/Gemfile
ADD Gemfile.lock /workdir/Gemfile.lock
RUN bundle install
# docker in docker (@jpetazzo/dind)
RUN apt-get update -qq && apt-get install -qqy \
apt-transport-https \
ca-certificates \
curl \
lxc \
iptables
RUN curl -sSL https://get.docker.com/ | sh
RUN wget https://raw.githubusercontent.com/jpetazzo/dind/master/wrapdocker && \
cp ./wrapdocker /usr/local/bin/wrapdocker && \
chmod +x /usr/local/bin/wrapdocker
VOLUME /var/lib/docker
# rake
ADD . /workdir
RUN bundle exec rake assets:precompile