forked from octobox/octobox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (24 loc) · 694 Bytes
/
Dockerfile
File metadata and controls
28 lines (24 loc) · 694 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
FROM ruby:2.5.1-alpine
RUN apk add --update \
build-base \
netcat-openbsd \
git \
nodejs \
postgresql-dev \
mysql-dev \
tzdata \
curl-dev \
&& rm -rf /var/cache/apk/*
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock /usr/src/app/
RUN bundle install --without test production --jobs 2
COPY . /usr/src/app
# Generate API Docs
RUN RAILS_ENV=development bin/rails api_docs:generate
# Allow the image to run with an arbitrary uid, but gid set to 0 (the OpenShift case)
RUN chgrp -R 0 /usr/src/app \
&& chmod -R g=u /usr/src/app
CMD ["bin/docker-start"]