-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 755 Bytes
/
Dockerfile
File metadata and controls
27 lines (20 loc) · 755 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
FROM ruby:2.6.3
# Install apt based dependencies required to run Rails
RUN apt-get update && apt-get install -y \
build-essential \
nodejs
# Set the working directory where the commands will be executed
RUN mkdir /shop
WORKDIR /shop
# Copy the Gemfile and the Gemfile.lock
# This is a separate step so the dependencies will be
# cached unless changes to one of those two files are made.
COPY Gemfile Gemfile.lock ./
# Install RubyGems
RUN gem install bundler && bundle install
# Copy the application in the current directory
COPY . ./
# Expose port 3000 to the Docker host, so we can access it from the outside
# EXPOSE 3000
# The main command to run when the container starts
# CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]