-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
47 lines (38 loc) · 1.25 KB
/
Dockerfile
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
40
41
42
43
44
45
46
47
#################################################################
# This docker image build file creates an image that contains
# ruby on rails. It is intended for you
# to use as a base for your project. Or as a template for your dockerfile.
#
# ## .
# ## ## ## ==
# ## ## ## ## ===
# /""""""""""""""""\___/ ===
# ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
# \______ o CFVegas __/
# \ \ __/
# \____\______/
#
# Component: Voter- API
#################################################################
# Select ubuntu as the base image
FROM rails
MAINTAINER @ryquinn
# reduce output from debconf
ENV DEBIAN_FRONTEND noninteractive
ENV PATH /usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# database.yml overrides (TODO: I may remove these later)
ENV rails_env development
ENV GOOGLEAPIKEY blahblah
# Move Gemfile to tmp directory so bundle install caches
WORKDIR /tmp
ADD Gemfile Gemfile
ADD Gemfile.lock Gemfile.lock
# bundle install
RUN /bin/bash -l -c 'bundle install'
# Add rails project to project directory
ADD ./ /rails
# set WORKDIR
WORKDIR /rails
# Expose some ports.
EXPOSE 3000
ENTRYPOINT export APIKEY=${GOOGLEAPIKEY} && ./startup