-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
35 lines (26 loc) · 972 Bytes
/
Dockerfile.dev
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
FROM ruby:2.6.2-alpine as builder
# Set local timezone
RUN apk add --update tzdata && \
cp /usr/share/zoneinfo/America/Detroit /etc/localtime && \
echo "America/Detroit" > /etc/timezone
# Install your app's runtime dependencies in the container
RUN apk add --update --virtual runtime-deps nodejs libffi-dev readline
# Bundle into the temp directory
WORKDIR /tmp
ADD Gemfile* ./
RUN gem update --system
RUN gem install bundler && gem update bundler
RUN apk add --virtual build-deps build-base postgresql-dev libc-dev linux-headers libxml2-dev libxslt-dev readline-dev && \
bundle install --jobs=2 && \
apk del build-deps
# Copy the app's code into the container
ENV APP_HOME /app
COPY . $APP_HOME
WORKDIR $APP_HOME
# Configure development environment variables
ENV RAILS_ENV=development \
RACK_ENV=development
# Expose port 3000 from the container
EXPOSE 3000
# Run puma server by default
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]