-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (16 loc) · 828 Bytes
/
Dockerfile
File metadata and controls
23 lines (16 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use Ruby 2.6.5 running on Alpine Linux 3.11.
FROM ruby:2.6.5-alpine3.11
# Update system's package manager.
RUN apk update --no-cache alpine-sdk
# Git is required to install the gems. It's used in .gemspec.
RUN apk add --no-cache git
# Install build-base so gems with native extensions can be used.
RUN apk add --no-cache build-base
# Bind the project's root directory to /src on the container.
WORKDIR /src
# Copy the project to the container so Bundler can install all the gems.
COPY ./ /src/
# Install the same version of Bundler that was used to create Gemfile.lock.
RUN gem install bundler:$(tail -n1 Gemfile.lock | awk '{$1=$1};1')
# Install the gems for every group, do not vendor the gems, and allow use of all CPU cores for parallel installations.
RUN bundle install --without="" --no-deployment --jobs=`nproc`