File tree 1 file changed +24
-3
lines changed
1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,36 @@ FROM debian:jessie
2
2
3
3
RUN apt-get update && apt-get install -y build-essential scons libssl-dev
4
4
5
+ # "--use-system" deps
6
+ RUN apt-get update && apt-get install -y \
7
+ libboost-dev \
8
+ libboost-filesystem-dev \
9
+ libboost-program-options-dev \
10
+ libboost-thread-dev \
11
+ libgoogle-perftools-dev \
12
+ libpcap-dev \
13
+ libpcre++-dev \
14
+ libsnappy-dev \
15
+ libstemmer-dev \
16
+ libv8-dev
17
+ ENV SCONS_OPTS --use-system-snappy --use-system-tcmalloc --use-system-pcre --use-system-boost --use-system-v8 --ssl
18
+
5
19
ADD . /usr/src/mongo
6
20
WORKDIR /usr/src/mongo
7
21
8
- RUN scons -j"$(nproc)" core tools
22
+ # the unstripped binaries and build artifacts are enormous, so we strip and
23
+ # remove them manually to help alleviate that huge layer being an issue
24
+ RUN scons -j"$(nproc)" $SCONS_OPTS core tools \
25
+ && find -maxdepth 1 -type f -executable -exec strip '{}' + \
26
+ && rm -rf build
9
27
10
28
# the tests compile huge amounts of data, so we skip them for now
11
- # RUN scons test
29
+ # RUN scons $SCONS_OPTS test
12
30
13
- RUN scons install
31
+ # since we're stripping and removing build artifacts, we get to install
32
+ # manually too (since scons rightfully thinks we need to rebuild)
33
+ # RUN scons $SCONS_OPTS install
34
+ RUN find -maxdepth 1 -type f -executable -exec ln -v '{}' /usr/local/bin/ ';'
14
35
15
36
VOLUME /data/db
16
37
You can’t perform that action at this time.
0 commit comments