File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ * .gem
2+ pkg
Original file line number Diff line number Diff line change 1+ # Dependencies we need available when running
2+ ARG RUN_DEPS="ruby-dev llvm libclang-3.8-dev python-pygments libffi6"
3+
4+ FROM debian:stretch-slim as builder
5+
6+ # Extra dependencies we need in the build container
7+ ARG BUILD_DEPS="git cmake pkg-config build-essential libffi-dev libssl-dev"
8+
9+ # takes the global value defined above
10+ ARG RUN_DEPS
11+
12+ # We need these packages to build ruby extensions, rugged and to parse the C
13+ # code. pygments is there to highlight the code examples.
14+ RUN apt update && \
15+ apt install -y --no-install-recommends ${BUILD_DEPS} ${RUN_DEPS} && \
16+ apt clean && \
17+ rm -rf /var/lib/apt/lists/*
18+
19+ WORKDIR /docurium
20+
21+ # This is here so we can provide a unique argument per run so docker does not
22+ # consider the rest of the file cached and wealways install the latest version
23+ # of docurium
24+ ARG CACHEBUST=1
25+
26+ COPY . /docurium/
27+ RUN gem build docurium && gem install docurium-*.gem --no-ri --no-rdoc
28+
29+ FROM debian:stretch-slim
30+
31+ # takes the global value defined above
32+ ARG RUN_DEPS
33+ RUN apt update && \
34+ apt install -y --no-install-recommends ${RUN_DEPS} && \
35+ apt clean && \
36+ rm -rf /var/lib/apt/lists/*
37+
38+ COPY --from=builder /var/lib/gems/ /var/lib/gems/
39+ COPY --from=builder /usr/local/bin/cm /usr/local/bin/cm
You can’t perform that action at this time.
0 commit comments