forked from vovimayhem/docker-compose-rails-dev-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 926 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (23 loc) · 926 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
# This Dockerfile is intended to build a production-ready app image.
#
# This is not required for development environments, which could use another
# image such as 'vovimayhem/dev-stack:ruby-2.2'
# TODO: Create the image that is used as a base for this!
FROM vovimayhem/app-container:ruby-2.2
MAINTAINER Roberto Quintanilla <roberto.quintanilla@gmail.com>
# Copy the rails app:
COPY . /app
# Run bundle install --deploy:
RUN bundle install --deploy
# Remove unused files as root:
USER root
# TODO: Actually remove the usued files, such as compilers, development source
# code headers, etc:
# - see https://blog.jtlebi.fr/2015/04/25/how-i-shrunk-a-docker-image-by-98-8-featuring-fanotify/
RUN echo 'Doing something...'
# Revert back to the 'app' user:
USER app
# Run the app in production mode by default:
ENV RACK_ENV=production RAILS_ENV=production
# Specify the default container command:
CMD ["rails s -p 0.0.0.0"]