-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (18 loc) · 765 Bytes
/
Dockerfile
File metadata and controls
26 lines (18 loc) · 765 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
FROM ruby:2.2 as builder
ENV RAILS_ENV production
WORKDIR /app
COPY . /app
RUN bundle install --standalone --system
FROM ruby:2.2-slim
RUN adduser docker \
&& mkdir -p /messages/sqs \
&& chown docker /messages/sqs
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/
COPY --from=builder /app/bin /app/bin
COPY --from=builder /app/lib /app/lib
USER docker
EXPOSE 9494
# Note: We use thin, because webrick attempts to do a reverse dns lookup on every request
# which slows the service down big time. There is a setting to override this, but sinatra
# does not allow server specific settings to be passed down.
CMD ["/usr/local/bundle/bin/fake_sqs", "--database=/messages/sqs/database.yml", "--bind", "0.0.0.0", "--port", "9494", "--server", "thin"]