forked from dockerfile/ruby-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 649 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (24 loc) · 649 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
#
# Ruby runtime Dockerfile
#
# https://github.com/dockerfile/ruby-runtime
#
# Pull base image.
FROM dockerfile/ruby
# Set instructions on build.
ONBUILD ADD apt-requirements.txt /app/
ONBUILD RUN apt-get update && \
apt-get -y install $(grep -vE "^\s*#" /app/apt-requirements.txt | tr "\n" " ") && \
rm -rf /var/lib/apt/lists/*
ONBUILD ADD Gemfile /app/
ONBUILD ADD Gemfile.lock /app/
ONBUILD RUN bundle install
ONBUILD ADD . /app
# Define working directory.
WORKDIR /app
# Set environment variables.
ENV APPSERVER webrick
# Define default command.
CMD bundle exec rackup -p 8080 /app/config.ru -s $APPSERVER
# Expose ports.
EXPOSE 8080