-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.development
More file actions
27 lines (22 loc) · 1.08 KB
/
Dockerfile.development
File metadata and controls
27 lines (22 loc) · 1.08 KB
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
FROM ruby:2.3.3
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
ENTRYPOINT [ \
"prehook", "bundle install -j3", "--", \
"prehook", "dockerize -timeout 60s -wait tcp://database:3306", "--" \
]
CMD ["rails", "server", "--bind", "0.0.0.0", "--pid", "/tmp/server.pid"]