-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
56 lines (43 loc) · 1.57 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Set which version of ROOT to be built with. This is usually going
# to be latest, but there are sometimes problems. The available tags
# are found at https://hub.docker.com/r/rootproject/root. There can
# be only one!
# ROOT generally distributes docker for the latest ubuntu LTS release
FROM rootproject/root:latest as base
# FROM rootproject/root:6.32.00-ubuntu24.04 as base
# FROM rootproject/root:6.30.06-ubuntu22.04 as base
SHELL ["/bin/bash", "-c"]
RUN apt-get update
# Install the prerequisites. Install individually and allow
# installation to fail since ubuntu tends to be a little jumpy about
# which packages are distributed.
RUN apt-get install -y git || true
RUN apt-get install -y libyaml-cpp-dev || true
RUN apt-get install -y nlohmann-json3-dev || true
RUN apt-get install -y libvdt-dev || true
ENV WORK_DIR /home/work
ENV REPO_DIR $WORK_DIR/repo
ENV BUILD_DIR $WORK_DIR/build
ENV INSTALL_DIR $WORK_DIR/install
RUN mkdir -p $REPO_DIR
RUN mkdir -p $BUILD_DIR
RUN mkdir -p $INSTALL_DIR
# Copying GUNDAM source files
COPY ./src $REPO_DIR/src
# COPY ./submodules $REPO_DIR/submodules # submodules are not pulled on github
COPY ./cmake $REPO_DIR/cmake
COPY ./CMakeLists.txt $REPO_DIR/CMakeLists.txt
COPY ./tests $REPO_DIR/tests
COPY ./.git $REPO_DIR/.git
# Checking out missing code
WORKDIR $REPO_DIR
RUN git submodule update --init --recursive
# Now build GUNDAM
WORKDIR $BUILD_DIR
RUN cmake \
-D CMAKE_INSTALL_PREFIX=$INSTALL_DIR \
$REPO_DIR
RUN make -j3 install
# run the tests
RUN . $INSTALL_DIR/setup.sh && CTEST_OUTPUT_ON_FAILURE=1 make test
# End of the file