forked from evolvingweb/sitediff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (26 loc) · 1007 Bytes
/
Dockerfile
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
FROM ruby:2.7
ARG DEBIAN_FRONTEND=noninteractive
# Minimal dependencies
# ======
# Building ruby native extensions requires ruby-dev, make
# Nokogiri requires libxml2, libxslt, pkg-config
# Typhoeus requires libcurl3
# Our build requires rake
# Install editors: vim, nano.
RUN apt-get update
RUN apt-get install -y apt-utils
RUN apt-get install -y software-properties-common
RUN apt-get install -y make pkg-config libxml2-dev libxslt-dev
RUN apt-get install -y vim nano git
# Force nokogiri gem not to compile libxml2, it takes too long
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES 1
# Install thor and rspec globally so we can test the gem without bundle exec
RUN gem install thor rspec --no-document
COPY . /sitediff
WORKDIR /sitediff
RUN apt-get install -y liblzma-dev
RUN gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib/
# Build as a gem
RUN gem build sitediff.gemspec && gem install sitediff --no-document
# Build locally
RUN bundle install