forked from ontoportal/ontologies_linked_data
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
36 lines (27 loc) · 924 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
34
35
36
ARG RUBY_VERSION=3.1
ARG DISTRO=bullseye
FROM ruby:$RUBY_VERSION-$DISTRO
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
libxml2 \
libxslt-dev \
openjdk-11-jre-headless \
raptor2-utils \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY Gemfile* *.gemspec ./
# Copy only the `version.rb` file to prevent missing file errors!
COPY lib/ontologies_linked_data/version.rb lib/ontologies_linked_data/
#Install the exact Bundler version from Gemfile.lock (if it exists)
RUN gem update --system && \
if [ -f Gemfile.lock ]; then \
BUNDLER_VERSION=$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1 | tr -d ' '); \
gem install bundler -v "$BUNDLER_VERSION"; \
else \
gem install bundler; \
fi
RUN bundle config set --global no-document 'true'
RUN bundle install --jobs 4 --retry 3
COPY . ./
CMD ["bundle", "exec", "rake"]