-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.test
35 lines (26 loc) · 1.09 KB
/
Dockerfile.test
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
FROM ruby:2.3.1
ENV APP_ROOT /usr/src/app
ENV DOCKERIZE_VERSION v0.3.0
ENV ENTRYKIT_VERSION 0.4.0
RUN apt-get update && apt-get install -y wget ca-certificates openssl \
# dockerize
&& wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
# entrykit
&& wget https://github.com/progrium/entrykit/releases/download/v${ENTRYKIT_VERSION}/entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
&& tar -xvzf entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
&& rm entrykit_${ENTRYKIT_VERSION}_Linux_x86_64.tgz \
&& mv entrykit /bin/entrykit \
&& chmod +x /bin/entrykit \
&& entrykit --symlink
WORKDIR $APP_ROOT
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN bundle install -j4
COPY . $APP_ROOT
EXPOSE 3000
ENTRYPOINT [ \
"prehook", "dockerize -timeout 60s -wait tcp://database:3306", "--" \
]
CMD ["rspec"]